app/nginx/default.conf

21 lines
581 B
Text
Raw Normal View History

2025-01-19 18:31:05 +01:00
server {
listen 80;
# Route API requests to Laravel
location /api/ {
proxy_pass http://backend:80/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
# Route all other requests to React
location / {
proxy_pass http://frontend:3000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
try_files $uri /index.html;
}
}