123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- daemon off;
- worker_processes auto;
- pid /run/nginx.pid;
- error_log stderr;
- events {
- worker_connections 768;
- # multi_accept on;
- }
- http {
- ##
- # Basic Settings
- ##
- sendfile on;
- tcp_nopush on;
- tcp_nodelay on;
- keepalive_timeout 65;
- types_hash_max_size 2048;
- include /etc/nginx/mime.types;
- default_type application/octet-stream;
- client_body_temp_path /run/client_body;
- proxy_temp_path /run/proxy_temp;
- fastcgi_temp_path /run/fastcgi_temp;
- scgi_temp_path /run/scgi_temp;
- uwsgi_temp_path /run/uwsgi_temp;
- ##
- # Logging Settings
- ##
- access_log /dev/stdout;
- ##
- # Gzip Settings
- ##
- gzip on;
- gzip_disable "msie6";
- ##
- # Virtual Host Configs
- ##
- server {
- listen 8000;
- server_name ##APP_DOMAIN##;
- large_client_header_buffers 4 32k;
- client_max_body_size 50M;
- charset utf-8;
- # 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;
- }
- }
- }
|