nginx.conf 389 B

123456789101112131415161718
  1. server {
  2. listen 80;
  3. root /usr/share/nginx/html;
  4. index index.html;
  5. # Proxy API calls to backend
  6. location /api/ {
  7. proxy_pass http://backend:3001/api/;
  8. proxy_http_version 1.1;
  9. proxy_set_header Host $host;
  10. proxy_set_header X-Real-IP $remote_addr;
  11. }
  12. # SPA fallback
  13. location / {
  14. try_files $uri $uri/ /index.html;
  15. }
  16. }