sharelatex.conf 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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://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 X-Forwarded-Host $host;
  11. proxy_set_header X-Forwarded-Proto $scheme;
  12. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  13. proxy_read_timeout 3m;
  14. proxy_send_timeout 3m;
  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 X-Forwarded-Host $host;
  22. proxy_set_header X-Forwarded-Proto $scheme;
  23. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  24. proxy_read_timeout 3m;
  25. proxy_send_timeout 3m;
  26. }
  27. location /stylesheets {
  28. expires 1y;
  29. root $static_path/;
  30. }
  31. location /minjs {
  32. expires 1y;
  33. root $static_path/;
  34. }
  35. location /img {
  36. expires 1y;
  37. root $static_path/;
  38. }
  39. }