events { worker_connections 1024; } http { upstream authors_service { server authors:3000; } upstream books_service { server books:3001; } server { listen 80; location /authors { proxy_pass http://authors_service; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; } location /books { proxy_pass http://books_service; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; } } }