nginx.conf 521 B

12345678910111213141516171819202122232425
  1. server {
  2. listen 80;
  3. server_name _;
  4. location / {
  5. root /usr/share/nginx/html/frontend;
  6. index index.html;
  7. try_files $uri $uri/ /index.html;
  8. }
  9. location /api/ {
  10. proxy_pass http://backend:8080/;
  11. proxy_set_header Host $host;
  12. proxy_cache_bypass $http_upgrade;
  13. }
  14. location /ws/ {
  15. proxy_pass http://backend:8080/;
  16. proxy_http_version 1.1;
  17. proxy_set_header Upgrade $http_upgrade;
  18. proxy_set_header Connection "upgrade";
  19. }
  20. }