nginx.conf 986 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. events {}
  2. http {
  3. server {
  4. listen 80;
  5. server_name localhost;
  6. location / {
  7. proxy_pass http://ui:5173;
  8. proxy_set_header Host $host;
  9. proxy_set_header X-Real-IP $remote_addr;
  10. proxy_http_version 1.1;
  11. proxy_set_header Upgrade $http_upgrade;
  12. proxy_set_header Connection "upgrade";
  13. }
  14. location /ws {
  15. proxy_pass http://ui:5173;
  16. proxy_set_header Host $host;
  17. proxy_set_header X-Real-IP $remote_addr;
  18. proxy_set_header Upgrade $http_upgrade;
  19. proxy_set_header Connection "upgrade";
  20. }
  21. location /socket.io/ {
  22. proxy_http_version 1.1;
  23. proxy_set_header Upgrade $http_upgrade;
  24. proxy_set_header Connection "upgrade";
  25. proxy_pass http://socket:8084/socket.io/;
  26. }
  27. location /api/ {
  28. rewrite ^/api/(.*) /$1 break;
  29. proxy_pass http://gateway:8084;
  30. proxy_set_header Host $host;
  31. proxy_set_header X-Real-IP $remote_addr;
  32. }
  33. }
  34. }