Thank you for the response. The problem is that "portal" doesn't exist no the backend servers. The request to http://nlb.com/portal goes to http://p1.com:7080/portal or http://p2.com:7443/portal, which doesn't exist. My attempt at doing:
proxy_pass http://conHTTP/arcgis
was so that the request comes in as http://nlb.com/portal and it gets translated to http://p1.com:7080/arcgis or http://p2.com:7080/arcgis. If the request comes in as https://nlb.com/portal, it goes to https://p1.com:7443/arcgis or https://p2.esri.com:7443/arcgis.
proxy_pass http://conHTTP/arcgis
was so that the request comes in as http://nlb.com/portal and it gets translated to http://p1.com:7080/arcgis or http://p2.com:7080/arcgis. If the request comes in as https://nlb.com/portal, it goes to https://p1.com:7443/arcgis or https://p2.esri.com:7443/arcgis.