nginx.conf 778 B

1234567891011121314151617181920212223242526272829303132
  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 /api/ {
  22. rewrite ^/api/(.*) /$1 break;
  23. proxy_pass http://gateway:8084;
  24. proxy_set_header Host $host;
  25. proxy_set_header X-Real-IP $remote_addr;
  26. }
  27. }
  28. }