nginx.conf 505 B

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