http { server { listen 80; listen [::]:80; server_name localhost; location /categoryService/ { proxy_pass http://category:8089/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Prefix /categoryService; } location /productService/ { proxy_pass http://product:8090/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Prefix /productService; } } } events { worker_connections 1024; }