# Calculate path=/etc/nginx/sites-enabled comment=# server { listen 80 default_server; server_name taiga.example.org; large_client_header_buffers 4 32k; client_max_body_size 50M; charset utf-8; access_log /var/log/nginx/taiga-access.log; error_log /var/log/nginx/taiga-error.log; # TLS: Configure your TLS following the best practices inside your company # Other configurations # Frontend location / { alias /var/calculate/www/taiga/taiga-front-dist/dist/; index index.html; try_files $uri $uri/ index.html =404; } # API 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; } # 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/admin/; proxy_redirect off; } # Static files location /static/ { alias /var/calculate/www/taiga/taiga-back/static/; } # Media location /_protected/ { internal; alias /var/calculate/www/taiga/taiga-back/media/; add_header Content-disposition "attachment"; } # Unprotected section location /media/exports/ { alias /var/calculate/www/taiga/taiga-back/media/exports/; add_header Content-disposition "attachment"; } location /media/ { 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:8003/; proxy_redirect off; } # Events location /events { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_connect_timeout 7d; proxy_send_timeout 7d; proxy_read_timeout 7d; proxy_pass http://127.0.0.1:8888/events; } }