server { listen 80; listen [::]:80; server_name localhost; location /user-service/ { proxy_pass http://user-service:8085/; 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 /user-service; } location /message-service/ { proxy_pass http://message-service:8086/; 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 /message-service; } }