nginx.conf 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. events {
  2. worker_connections 768;
  3. }
  4. http {
  5. server {
  6. listen 80;
  7. access_log off; # this is handled by the container
  8. error_log off;
  9. server_name my.gmus;
  10. location / {
  11. proxy_pass http://gmus-backend:3000;
  12. proxy_set_header Host $http_host;
  13. proxy_set_header X-Real-IP $remote_addr;
  14. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  15. proxy_set_header X-Forwarded-Proto $scheme;
  16. }
  17. location /pubsub {
  18. proxy_pass http://gmus-backend:3000/pubsub;
  19. proxy_http_version 1.1;
  20. proxy_set_header Upgrade $http_upgrade;
  21. proxy_set_header Connection "Upgrade";
  22. proxy_set_header Host $host;
  23. }
  24. }
  25. server {
  26. listen 443 ssl http2;
  27. access_log off; # this is handled by the container
  28. error_log off;
  29. # self-signed (development mode)
  30. ssl_certificate /etc/certificates/cert.pem;
  31. ssl_certificate_key /etc/certificates/key.pem;
  32. server_name my.budget;
  33. location / {
  34. proxy_pass http://gmus-backend:3000;
  35. proxy_set_header Host $http_host;
  36. proxy_set_header X-Real-IP $remote_addr;
  37. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  38. proxy_set_header X-Forwarded-Proto $scheme;
  39. }
  40. location /pubsub {
  41. proxy_pass http://gmus-backend:3000/pubsub;
  42. proxy_http_version 1.1;
  43. proxy_set_header Upgrade $http_upgrade;
  44. proxy_set_header Connection "Upgrade";
  45. proxy_set_header Host $host;
  46. }
  47. }
  48. }