# nginx.conf # This file will be mounted into /etc/nginx/conf.d/default.conf inside the container # Enable proxy buffers (optional but recommended) proxy_buffering on; proxy_buffers 16 16k; proxy_buffer_size 32k; server { listen 80; server_name localhost; # -------------------------------------------------------------------- # Proxy everything under "/" to the Node backend # -------------------------------------------------------------------- location / { proxy_pass http://172.17.0.1: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; } # -------------------------------------------------------------------- # Proxy everything under "/history" to the Apache backend # -------------------------------------------------------------------- location /history/ { proxy_pass http://172.17.0.1:8080/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } # Optional: If you want `/history` (without trailing slash) to be # redirected to `/history/`: location = /history { return 301 /history/; } }