taiga.nginx.conf 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. server {
  2. listen 8000 default_server;
  3. server_name _;
  4. large_client_header_buffers 4 32k;
  5. client_max_body_size 50M;
  6. charset utf-8;
  7. access_log /var/log/nginx.access.log;
  8. error_log /var/log/nginx.error.log;
  9. # Frontend
  10. location / {
  11. root /app/code/taiga-front-dist/dist/;
  12. try_files $uri $uri/ /index.html;
  13. }
  14. # Backend
  15. location /api {
  16. proxy_set_header Host $http_host;
  17. proxy_set_header X-Real-IP $remote_addr;
  18. proxy_set_header X-Scheme $scheme;
  19. proxy_set_header X-Forwarded-Proto $scheme;
  20. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  21. proxy_pass http://127.0.0.1:8001/api;
  22. proxy_redirect off;
  23. }
  24. # Django admin access (/admin/)
  25. location /admin {
  26. proxy_set_header Host $http_host;
  27. proxy_set_header X-Real-IP $remote_addr;
  28. proxy_set_header X-Scheme $scheme;
  29. proxy_set_header X-Forwarded-Proto $scheme;
  30. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  31. proxy_pass http://127.0.0.1:8001$request_uri;
  32. proxy_redirect off;
  33. }
  34. # Static files
  35. location /static {
  36. alias /app/code/taiga-back/static;
  37. }
  38. # Media files
  39. location /media {
  40. alias /app/code/taiga-back/media;
  41. }
  42. }