default.conf 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. server {
  2. listen 80;
  3. #server_name your.domain;
  4. #charset koi8-r;
  5. #access_log /var/log/nginx/host.access.log main;
  6. location / {
  7. root /usr/share/nginx/html;
  8. index index.html index.htm;
  9. }
  10. location /server {
  11. proxy_connect_timeout 300;
  12. proxy_pass http://node:3000;
  13. proxy_set_header Connection "upgrade";
  14. proxy_set_header Upgrade $http_upgrade;
  15. proxy_set_header X-Forwarded-for $remote_addr;
  16. }
  17. location /ca.crt {
  18. alias /etc/ssl/certs/snapdropCA.crt;
  19. }
  20. #error_page 404 /404.html;
  21. # redirect server error pages to the static page /50x.html
  22. #
  23. error_page 500 502 503 504 /50x.html;
  24. location = /50x.html {
  25. root /usr/share/nginx/html;
  26. }
  27. }
  28. server {
  29. listen 443 ssl http2;
  30. ssl_certificate /etc/ssl/certs/snapdrop-dev.crt;
  31. ssl_certificate_key /etc/ssl/certs/snapdrop-dev.key;
  32. #server_name ;
  33. #charset koi8-r;
  34. #access_log /var/log/nginx/host.access.log main;
  35. location / {
  36. root /usr/share/nginx/html;
  37. index index.html index.htm;
  38. }
  39. location /server {
  40. proxy_connect_timeout 300;
  41. proxy_pass http://node:3000;
  42. proxy_set_header Connection "upgrade";
  43. proxy_set_header Upgrade $http_upgrade;
  44. proxy_set_header X-Forwarded-for $remote_addr;
  45. }
  46. location /ca.crt {
  47. alias /etc/ssl/certs/snapdropCA.crt;
  48. }
  49. #error_page 404 /404.html;
  50. # redirect server error pages to the static page /50x.html
  51. #
  52. error_page 500 502 503 504 /50x.html;
  53. location = /50x.html {
  54. root /usr/share/nginx/html;
  55. }
  56. }