How to configure NGINX to route external request to my stage and production docker hosts

Solution 1:

seems the backend is https so the proxy_pass should be https also like bellow:

location /upstream {
    proxy_pass https://backend.example.com;
}

Please check securing-http-traffic-upstream