events { worker_connections 1024; } http { server { listen 80; location / { proxy_pass http://front:5000; } # configure here where requests to http://localhost/api/... # are forwarded location /api/ { proxy_set_header Host $host; proxy_pass http://back:8080/; } } }