default.conf 1.7 KB

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