sharelatex.conf 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. server {
  2. listen 80;
  3. server_name _; # Catch all, see http://nginx.org/en/docs/http/server_names.html
  4. set $static_path /var/www/sharelatex/web/public;
  5. location / {
  6. proxy_pass http://localhost:3000;
  7. proxy_set_header Host $http_x_forwarded_host;
  8. proxy_http_version 1.1;
  9. proxy_set_header Upgrade $http_upgrade;
  10. proxy_set_header Connection "upgrade";
  11. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  12. proxy_read_timeout 3m;
  13. proxy_send_timeout 3m;
  14. }
  15. location /socket.io {
  16. proxy_pass http://localhost:3026;
  17. proxy_set_header X-Forwarded-Proto $scheme;
  18. proxy_set_header Host $http_x_forwarded_host;
  19. proxy_http_version 1.1;
  20. proxy_set_header Upgrade $http_upgrade;
  21. proxy_set_header Connection "upgrade";
  22. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  23. proxy_read_timeout 3m;
  24. proxy_send_timeout 3m;
  25. }
  26. location /stylesheets {
  27. expires 1y;
  28. root $static_path/;
  29. }
  30. location /minjs {
  31. expires 1y;
  32. root $static_path/;
  33. }
  34. location /img {
  35. expires 1y;
  36. root $static_path/;
  37. }
  38. }