sharelatex.conf 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. server {
  2. listen 80;
  3. server_name _; # Catch all, see http://nginx.org/en/docs/http/server_names.html
  4. root /overleaf/services/web/public/;
  5. location / {
  6. proxy_pass http://127.0.0.1:3000;
  7. proxy_http_version 1.1;
  8. proxy_set_header Upgrade $http_upgrade;
  9. proxy_set_header Connection "upgrade";
  10. proxy_set_header Host $host;
  11. proxy_set_header X-Forwarded-Host $host;
  12. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  13. proxy_read_timeout 10m;
  14. proxy_send_timeout 10m;
  15. }
  16. location /socket.io {
  17. proxy_pass http://127.0.0.1:3026;
  18. proxy_http_version 1.1;
  19. proxy_set_header Upgrade $http_upgrade;
  20. proxy_set_header Connection "upgrade";
  21. proxy_set_header Host $host;
  22. proxy_set_header X-Forwarded-Host $host;
  23. proxy_set_header X-Forwarded-Proto $scheme;
  24. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  25. proxy_read_timeout 10m;
  26. proxy_send_timeout 10m;
  27. }
  28. location /stylesheets {
  29. expires 1y;
  30. }
  31. location /minjs {
  32. expires 1y;
  33. }
  34. location /img {
  35. expires 1y;
  36. }
  37. # handle output files for specific users
  38. location ~ ^/project/([0-9a-f]+)/user/([0-9a-f]+)/build/([0-9a-f-]+)/output/output\.([a-z]+)$ {
  39. proxy_pass http://127.0.0.1:8080; # clsi-nginx.conf
  40. proxy_http_version 1.1;
  41. }
  42. # handle output files for anonymous users
  43. location ~ ^/project/([0-9a-f]+)/build/([0-9a-f-]+)/output/output\.([a-z]+)$ {
  44. proxy_pass http://127.0.0.1:8080; # clsi-nginx.conf
  45. proxy_http_version 1.1;
  46. }
  47. # PDF range for specific users
  48. location ~ ^/project/([0-9a-f]+)/user/([0-9a-f]+)/content/([0-9a-f-]+/[0-9a-f]+)$ {
  49. proxy_pass http://127.0.0.1:8080; # clsi-nginx.conf
  50. proxy_http_version 1.1;
  51. }
  52. # PDF range for anonymous users
  53. location ~ ^/project/([0-9a-f]+)/content/([0-9a-f-]+/[0-9a-f]+)$ {
  54. proxy_pass http://127.0.0.1:8080; # clsi-nginx.conf
  55. proxy_http_version 1.1;
  56. }
  57. }