12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- server {
- listen 8000 default_server;
- server_name _;
- large_client_header_buffers 4 32k;
- client_max_body_size 50M;
- charset utf-8;
- access_log /var/log/nginx.access.log;
- error_log /var/log/nginx.error.log;
- # Frontend
- location / {
- root /app/code/taiga-front-dist/dist/;
- try_files $uri $uri/ /index.html;
- }
- # Backend
- location /api {
- proxy_set_header Host $http_host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Scheme $scheme;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_pass http://127.0.0.1:8001/api;
- proxy_redirect off;
- }
- # Django admin access (/admin/)
- location /admin {
- proxy_set_header Host $http_host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Scheme $scheme;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_pass http://127.0.0.1:8001$request_uri;
- proxy_redirect off;
- }
- # Static files
- location /static {
- alias /app/code/taiga-back/static;
- }
- # Media files
- location /media {
- alias /app/code/taiga-back/media;
- }
- }
|