dev.nginx.conf 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. worker_processes 1;
  2. events {
  3. worker_connections 1024;
  4. }
  5. http {
  6. include /etc/nginx/mime.types;
  7. default_type application/octet-stream;
  8. types {
  9. application/manifest+json webmanifest;
  10. }
  11. sendfile off;
  12. keepalive_timeout 65;
  13. server {
  14. listen 80;
  15. server_name localhost;
  16. location / {
  17. expires off;
  18. add_header Cache-Control "public, max-age=0, s-maxage=0, must-revalidate" always;
  19. proxy_set_header X-Real-IP $remote_addr;
  20. proxy_set_header X-Forwarded-For $remote_addr;
  21. proxy_set_header Host $host;
  22. proxy_http_version 1.1;
  23. proxy_set_header Upgrade $http_upgrade;
  24. proxy_set_header Connection "upgrade";
  25. proxy_redirect off;
  26. proxy_pass http://localhost:81;
  27. }
  28. location /backend {
  29. expires off;
  30. add_header Cache-Control "public, max-age=0, s-maxage=0, must-revalidate" always;
  31. proxy_set_header X-Real-IP $remote_addr;
  32. proxy_set_header X-Forwarded-For $remote_addr;
  33. proxy_set_header Host $host;
  34. proxy_http_version 1.1;
  35. proxy_set_header Upgrade $http_upgrade;
  36. proxy_set_header Connection "upgrade";
  37. proxy_redirect off;
  38. rewrite ^/backend/?(.*) /$1 break;
  39. proxy_pass http://backend:8080;
  40. }
  41. }
  42. }