nginx.prod.conf 562 B

123456789101112131415161718192021222324
  1. server {
  2. listen 80;
  3. server_name _;
  4. root /usr/share/nginx/html;
  5. location / {
  6. try_files $uri /$uri /index.html =404;
  7. }
  8. location /backend {
  9. proxy_set_header X-Real-IP $remote_addr;
  10. proxy_set_header X-Forwarded-For $remote_addr;
  11. proxy_set_header Host $host;
  12. proxy_http_version 1.1;
  13. proxy_set_header Upgrade $http_upgrade;
  14. proxy_set_header Connection "upgrade";
  15. proxy_redirect off;
  16. rewrite ^/backend/?(.*) /$1 break;
  17. proxy_pass http://backend:8080;
  18. }
  19. }