nginx.conf 511 B

123456789101112131415161718192021
  1. server {
  2. listen 80;
  3. server_name _;
  4. root /usr/share/nginx/html;
  5. index index.html;
  6. location /api/ {
  7. proxy_pass http://backend:5500/api/;
  8. proxy_http_version 1.1;
  9. proxy_set_header Host $host;
  10. proxy_set_header X-Real-IP $remote_addr;
  11. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  12. proxy_set_header X-Forwarded-Proto $scheme;
  13. proxy_read_timeout 120s;
  14. }
  15. location / {
  16. try_files $uri $uri/ /index.html;
  17. }
  18. }