nginx.conf 481 B

1234567891011121314151617181920
  1. server {
  2. listen 80;
  3. server_name localhost;
  4. # Serve Static Files
  5. location / {
  6. root /usr/share/nginx/html;
  7. index index.html index.htm;
  8. try_files $uri $uri/ /index.html;
  9. }
  10. # Proxy API requests to Backend
  11. location /api/ {
  12. proxy_pass http://backend:8000/api/;
  13. proxy_set_header Host $host;
  14. proxy_set_header X-Real-IP $remote_addr;
  15. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  16. }
  17. }