Portal redirects to internal address

1176
4
Jump to solution
03-09-2023 01:37 PM
Rodrigo_DaSilva
New Contributor III

Hey guys,

I'm having the error on my Portal for ArcGIS when clicking Sign In.
When I click on it, the system redirects to my Internal domain (hostname Apache2 Web server) instead of making the request with the Public domain.
I've already checked my server's proxy rules, but to no avail.
I will describe my scenario below in case anyone can contribute with ideas and suggestions

Apache2 serving as Reverse Proxy for tomcat, AJP connector
Rules:
ProxyRequests off
ProxyPreserveHost On
ProxyPass /portal ajp://localhost:8009/portal
ProxyPassReverse /portal ajp://localhost:8009/portal

Public DNS: https://mydomain.local.org/portal
Hostname apache2 server: https://mywebserver.local/

And, if I change the WebContext property in Portal for ArcGIS, the error is different, instead of calling the internal address, it loops, generating "Too Many Redirect Errors"

Version ArcGIS: 10.9.1

0 Kudos
1 Solution

Accepted Solutions
DavidHoy
Esri Contributor

f your reverse proxy is forwarding requests to your web adaptors on http rather than https, the portal and server will redirect the client to the same fqdn via https - the Reverse Proxy will send the request through to the WA again on https and it will loop - causing a too many redirects.
short answer - make sure the reverse proxy is forwarding to the WAs on https (and the WA to the portal on https too)

View solution in original post

4 Replies
Scott_Tansley
MVP Regular Contributor

Basically, always use the webcontexturl, or you will get the redirect.

The too many redirect errors is generally caused by your browser, not the software.  You can try using 'InPrivate' mode or clearing your cookies to resolve that one.

Scott Tansley
https://www.linkedin.com/in/scotttansley/
JalesM
by Esri Contributor
Esri Contributor

You could try setting the privatePortalURL, along with the WebContextURL, to the public URL. See the API here: 

https://developers.arcgis.com/rest/enterprise-administration/portal/system-properties.htm

Your deployment sounds somewhat similar to the one show here:

https://enterprise.arcgis.com/en/portal/latest/administer/windows/ha-scenarios-web-gis.htm#GUID-8175...

0 Kudos
DavidHoy
Esri Contributor

f your reverse proxy is forwarding requests to your web adaptors on http rather than https, the portal and server will redirect the client to the same fqdn via https - the Reverse Proxy will send the request through to the WA again on https and it will loop - causing a too many redirects.
short answer - make sure the reverse proxy is forwarding to the WAs on https (and the WA to the portal on https too)

Lu-chiaChuang
New Contributor III

Thanks for your post which helped me solve a similar problem with a newly installed ArcGIS Portal.

My company uses Citrix NetScaler to redirect public requests to internal web servers. I have a couple ArcGIS Portal systems that do not have this problem, but a newly installed ArcGIS Portal kept getting too many redirect errors. I spent a couple weeks to reinstall the ArcGIS Enterprise without success. It turned out that NetScaler admin put a "HTTPS to HTTP" rule for the web server of the new ArcGIS portal. That's why I kept getting too many redirect error. Once we changed the rule back to "HTTPS to HTTPS". Everything works. 

Again, thank you for your help.

Luke