nginx.dev.conf 821 B

12345678910111213141516171819202122232425262728293031
  1. server {
  2. listen 80;
  3. server_name _;
  4. location / {
  5. proxy_set_header X-Real-IP $remote_addr;
  6. proxy_set_header X-Forwarded-For $remote_addr;
  7. proxy_set_header Host $host;
  8. proxy_http_version 1.1;
  9. proxy_set_header Upgrade $http_upgrade;
  10. proxy_set_header Connection "upgrade";
  11. proxy_redirect off;
  12. proxy_pass http://localhost:81;
  13. }
  14. location /backend {
  15. proxy_set_header X-Real-IP $remote_addr;
  16. proxy_set_header X-Forwarded-For $remote_addr;
  17. proxy_set_header Host $host;
  18. proxy_http_version 1.1;
  19. proxy_set_header Upgrade $http_upgrade;
  20. proxy_set_header Connection "upgrade";
  21. proxy_redirect off;
  22. rewrite ^/backend/?(.*) /$1 break;
  23. proxy_pass http://backend:8080;
  24. }
  25. }