<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Issue in the Token Generation using a Reverse Proxy Server (Apache) with Portal in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/issue-in-the-token-generation-using-a-reverse/m-p/1003608#M28971</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/196643"&gt;@ChristopherPawlyszyn&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the recomendation, it seems that dont have effect.&lt;/P&gt;&lt;P&gt;I have added the parameter, and&amp;nbsp;I restarted the service.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;Location "/portal/"&amp;gt;
    ProxyAddHeaders Off
    Header set X-Forwarded-Host ubuntu.dns.com
...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check, and intertally I can see that rewrites the port to 7443.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="312020-11-20_13-32-00.png" style="width: 928px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/716i2688FD9FBA95CAB3/image-size/large?v=v2&amp;amp;px=999" role="button" title="312020-11-20_13-32-00.png" alt="312020-11-20_13-32-00.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This happens in all the site, for example when the end user logged out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="102020-11-20_13-07-50.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/714i0A54425B7692E385/image-size/large?v=v2&amp;amp;px=999" role="button" title="102020-11-20_13-07-50.png" alt="102020-11-20_13-07-50.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or in Portal when try to validate the federated server.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="202020-11-20_13-09-05.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/715iB357A6F0E6D7C732/image-size/large?v=v2&amp;amp;px=999" role="button" title="202020-11-20_13-09-05.png" alt="202020-11-20_13-09-05.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also tried enabling the proxyaddheaders on and adding the sert x-fordwarded-host header but it doesn't work either (redirects to https://&lt;STRONG&gt;internal.server.domain:7443&lt;/STRONG&gt;/portal/...).&lt;/P&gt;&lt;P&gt;Im trying to doing a port redirection; but I have no luck&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RewriteCond %{SERVER_PORT} 7443&lt;BR /&gt;RewriteRule ^(.*)$ &lt;A href="https://ubuntu.dns.com/$1" target="_blank"&gt;https://ubuntu.dns.com/$1&lt;/A&gt; [R,L]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;</description>
    <pubDate>Fri, 20 Nov 2020 19:45:25 GMT</pubDate>
    <dc:creator>lvargas</dc:creator>
    <dc:date>2020-11-20T19:45:25Z</dc:date>
    <item>
      <title>Issue in the Token Generation using a Reverse Proxy Server (Apache) with Portal</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/issue-in-the-token-generation-using-a-reverse/m-p/1001829#M28916</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;The environment is ArcGIS Enterprise 10.7.1 federated and distributed in 3 servers in Windows Server (Portal, ArcGIS GIS Server and DataStore), is running "normally" and are virtualized servers in VMware.&lt;/P&gt;&lt;P&gt;Tomcat and WebAdaptor were used to expose the environment, but due internal rules the organization it was decided not to use it and to expose it through a reverse proxy, Apache is used to manage the communication.&lt;/P&gt;&lt;P&gt;They have a rule like this.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;RewriteEngine On&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;RewriteCond %{REQUEST_METHOD} ^TRACE&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;RewriteRule .* - [f]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;RewriteCond %{REQUEST_METHOD} ^TRACK&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;RewriteRule .* - [f]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;RewriteRule ^/portal$ &lt;A href="https://public.dns.com/portal/" target="_blank"&gt;https://public.dns.com/portal/&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;lt;Location “/portal”&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ProxyPass &lt;A href="https://internal.server.domain:7443/arcgis" target="_blank"&gt;https://internal.server.domain:7443/arcgis&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ProxyPassReverse &lt;A href="https://internal.server.domain:7443/arcgis" target="_blank"&gt;https://internal.server.domain:7443/arcgis&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Header set Access-Control-Allow-Origin “*”&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;lt;/Location&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Almost the same conifguration for the ArcGIS GIS Server.&lt;/P&gt;&lt;P&gt;The access to Portal website is viable, you can log in, see the services (from ArcGIS GIS Server and hosted), view the viewers created before, creates new maps, WAB etc.&lt;/P&gt;&lt;P&gt;The issue its related to Portal, when it is required to access for example to Survey123 app, the ArcGIS Server manager to check the services etc (where it is required to generate security tokens) it returns the URL of the internal machine where the request was directed. This is problematic, as clients will not be able to access this URL. Also, this gives the client access to some information about the internal machine.&lt;/P&gt;&lt;P&gt;This is the same situation describe here.&lt;/P&gt;&lt;P&gt;Prepare your reverse proxy&lt;/P&gt;&lt;P&gt;&lt;A href="https://enterprise.arcgis.com/en/web-adaptor/latest/install/iis/using-a-reverse-proxy-server-with-portal-for-arcgis.htm" target="_blank"&gt;https://enterprise.arcgis.com/en/web-adaptor/latest/install/iis/using-a-reverse-proxy-server-with-portal-for-arcgis.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The request starts from something like this (the correct url):&lt;/P&gt;&lt;P&gt;https://&lt;STRONG&gt;public.dns.com&lt;/STRONG&gt;/portal/sharing/rest/oauth2/authorize?....&lt;/P&gt;&lt;P&gt;But it is redirected to the internal Portal server.&lt;/P&gt;&lt;P&gt;https://&lt;STRONG&gt;internal.server.domain:7443&lt;/STRONG&gt;/portal/sharing/rest/oauth2/authorize?....&lt;/P&gt;&lt;P&gt;We can manually correct the url from i&lt;STRONG&gt;nternal.server.domain:7443&lt;/STRONG&gt; to &lt;STRONG&gt;public.dns.com&lt;/STRONG&gt; and works fine, but this should be done by the reverse proxy.&lt;/P&gt;&lt;P&gt;We believe that its related to the value &lt;STRONG&gt;X-Forwarded-Host&lt;/STRONG&gt;, that Apache do not have it; be we're not sure how configured, we have tried different configurations online and don’t work.&lt;/P&gt;&lt;P&gt;Have you seen this inconvenience before?&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 18:05:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/issue-in-the-token-generation-using-a-reverse/m-p/1001829#M28916</guid>
      <dc:creator>lvargas</dc:creator>
      <dc:date>2020-11-16T18:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in the Token Generation using a Reverse Proxy Server (Apache) with Portal</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/issue-in-the-token-generation-using-a-reverse/m-p/1003416#M28963</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/414435"&gt;@lvargas&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did some testing on an HTTPD reverse proxy installed on a CentOS VM and did not see the effect you are describing, I've attached a sanitized snippet of my HTTPD ssl.conf file with the relevant information.&lt;/P&gt;&lt;P&gt;According to the Apache documentation (linked below) the X-Forwarded-For, X-Forwarded-Host, and X-Forwarded-Server headers are all appended by default to the request when using the ProxyPass directive.&lt;/P&gt;&lt;P&gt;mod_proxy - Apache HTTP Server Version 2.4&lt;BR /&gt;&lt;A href="http://mod_proxy%20- Apache HTTP Server Version 2.4 https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#x-headers" target="_blank" rel="noopener"&gt;https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#x-headers&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Have you confirmed the WebContextURL is configured for the Portal site?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markdown"&gt;RewriteEngine On
SSLProxyEngine On

&amp;lt;Location "/portal"&amp;gt;
    ProxyPass https://machine.domain.com/portal/home
&amp;lt;/Location&amp;gt;

&amp;lt;Location "/server"&amp;gt;
    ProxyPass https://machine.domain.com/server/rest/services
&amp;lt;/Location&amp;gt;

&amp;lt;Location "/portal/"&amp;gt;
    RedirectMatch ^/portal/$ https://machine.domain.com/portal/home/
    ProxyPass https://machine.domain.com:7443/arcgis/
    ProxyPassReverse https://machine.domain.com:7443/arcgis/
&amp;lt;/Location&amp;gt;

&amp;lt;Location "/server/"&amp;gt;
    RedirectMatch ^/server/$ https://machine.domain.com/server/rest/services
    ProxyPass https://machine.domain.com:6443/arcgis/
    ProxyPassReverse https://machine.domain.com:6443/arcgis/
&amp;lt;/Location&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 20 Nov 2020 14:06:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/issue-in-the-token-generation-using-a-reverse/m-p/1003416#M28963</guid>
      <dc:creator>ChristopherPawlyszyn</dc:creator>
      <dc:date>2020-11-20T14:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in the Token Generation using a Reverse Proxy Server (Apache) with Portal</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/issue-in-the-token-generation-using-a-reverse/m-p/1003463#M28965</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/196643"&gt;@ChristopherPawlyszyn&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your comments.&lt;/P&gt;&lt;P&gt;I made the changes, and now it is like this (for security reasons server name and the public dns have been changed). I have verified and the inconvenience persists.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;VirtualHost *:443&amp;gt;

ServerName ubuntu.dns.com
ServerAlias ubuntu.dns.com

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

SSLCertificateFile /etc/ssl/certs/apache.crt
SSLCertificateKeyFile /etc/ssl/private/apache.key


SSLEngine on
RewriteEngine On
SSLProxyEngine On

&amp;lt;Location "/portal"&amp;gt;
ProxyPass https://ubuntu.dns.com/portal/home
&amp;lt;/Location&amp;gt;

&amp;lt;Location "/server"&amp;gt;
ProxyPass https://ubuntu.dns.com/server/rest/services
&amp;lt;/Location&amp;gt;

&amp;lt;Location "/portal/"&amp;gt;
RedirectMatch ^/portal/$ https://ubuntu.dns.com/portal/home/
ProxyPass https://internal.server.domain:7443/arcgis/
ProxyPassReverse https://internal.server.domain:7443/arcgis/
&amp;lt;/Location&amp;gt;

&amp;lt;Location "/server/"&amp;gt;
RedirectMatch ^/server/$ https://ubuntu.dns.com/server/rest/services/
ProxyPass https://internal.server.domain:6443/arcgis/
ProxyPassReverse https://internal.server.domain:6443/arcgis/
&amp;lt;/Location&amp;gt;

&amp;lt;/VirtualHost&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In Portal we can check the ArcGIS Server federation, and looks fine.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="12020-11-20_08-38-26.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/677i9E8584062FDC78BD/image-size/large?v=v2&amp;amp;px=999" role="button" title="12020-11-20_08-38-26.png" alt="12020-11-20_08-38-26.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the admin too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="52020-11-20_08-43-11.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/680iCB5DAB6A1EF747B5/image-size/large?v=v2&amp;amp;px=999" role="button" title="52020-11-20_08-43-11.png" alt="52020-11-20_08-43-11.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Portal the URL of ArcGIS Server looks fine (&lt;A href="https://ubuntu.dns.com/server" target="_blank"&gt;https://ubuntu.dns.com/server&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="22020-11-20_08-40-18.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/678iAA35A6403FD3380C/image-size/large?v=v2&amp;amp;px=999" role="button" title="22020-11-20_08-40-18.png" alt="22020-11-20_08-40-18.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if we select it, to take us to ArcGIS Manager; it continues addressing to the internal server.&lt;/P&gt;&lt;P&gt;https://&lt;STRONG&gt;internal.server.domain:7443&lt;/STRONG&gt;/portal/sharing/oauth2/approve?oauth_state=mC7oBv_Zc_QIonWy4HsBUXyLIxJxXO9-gaBsz_M&lt;/P&gt;&lt;P&gt;The wrong in the redirection is the name of the internal server, which corresponds where the Portal is installed, the /portal/token etc its fine.&lt;/P&gt;&lt;P&gt;This happens when access token generation is necessary, for example when you login into Survey123.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="42020-11-20_08-41-54.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/679i91B92FD3956A4FE6/image-size/large?v=v2&amp;amp;px=999" role="button" title="42020-11-20_08-41-54.png" alt="42020-11-20_08-41-54.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems that there are some additional details that should be modified.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 15:30:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/issue-in-the-token-generation-using-a-reverse/m-p/1003463#M28965</guid>
      <dc:creator>lvargas</dc:creator>
      <dc:date>2020-11-20T15:30:59Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in the Token Generation using a Reverse Proxy Server (Apache) with Portal</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/issue-in-the-token-generation-using-a-reverse/m-p/1003474#M28966</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/196643"&gt;@ChristopherPawlyszyn&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Have you confirmed the WebContextURL is configured for the Portal site?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Yes, both webcontexturls (Portal and ArcGIS GIS Server) are configured with the external DNS.&lt;/P&gt;&lt;P&gt;Portal&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="62020-11-20_09-32-10.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/683iB5F80F6CF2C3399D/image-size/large?v=v2&amp;amp;px=999" role="button" title="62020-11-20_09-32-10.png" alt="62020-11-20_09-32-10.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ArcGIS GIS Server&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="72020-11-20_09-32-10.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/684iF3DD4A98A8E09F0C/image-size/large?v=v2&amp;amp;px=999" role="button" title="72020-11-20_09-32-10.png" alt="72020-11-20_09-32-10.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 15:37:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/issue-in-the-token-generation-using-a-reverse/m-p/1003474#M28966</guid>
      <dc:creator>lvargas</dc:creator>
      <dc:date>2020-11-20T15:37:10Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in the Token Generation using a Reverse Proxy Server (Apache) with Portal</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/issue-in-the-token-generation-using-a-reverse/m-p/1003521#M28968</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/414435"&gt;@lvargas&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I think I understand the behavior now and have amended my /portal location configuration, let me know how it fares for you.&lt;/P&gt;&lt;LI-CODE lang="markdown"&gt;&amp;lt;Location "/portal/"&amp;gt;
    ProxyPreserveHost On
    RedirectMatch ^/portal/$ https://machine.domain.com/portal/home/
    RedirectMatch ^/portal/portaladmin$ https://machine.domain.com/portal/portaladmin/
    ProxyPass https://machine.domain.com:7443/arcgis/
    ProxyPassReverse https://machine.domain.com:7443/arcgis/
&amp;lt;/Location&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 17:00:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/issue-in-the-token-generation-using-a-reverse/m-p/1003521#M28968</guid>
      <dc:creator>ChristopherPawlyszyn</dc:creator>
      <dc:date>2020-11-20T17:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in the Token Generation using a Reverse Proxy Server (Apache) with Portal</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/issue-in-the-token-generation-using-a-reverse/m-p/1003566#M28969</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/196643"&gt;@ChristopherPawlyszyn&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your comments and time.&lt;/P&gt;&lt;P&gt;Using ProxyPreserveHost On affects the redirection of the site, when we use https:// ubuntu.dns.com/portal/home/ a redirection is made to https://&lt;STRONG&gt;internal.server.domain&lt;/STRONG&gt;/&lt;STRONG&gt;arcgis&lt;/STRONG&gt;/home/ so its not possible use the site.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="12020-11-20_11-23-24.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/707iB19E3963BA5C6176/image-size/large?v=v2&amp;amp;px=999" role="button" title="12020-11-20_11-23-24.png" alt="12020-11-20_11-23-24.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;An option I have used is to disable the headers, ProxyAddHeaders Off&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;Location "/portal/"&amp;gt;

    ProxyAddHeaders Off

    RedirectMatch ^/portal/$ https://ubuntu.dns.com/portal/home/

    RedirectMatch ^/portal/portaladmin$ https://ubuntu.dns.com /portal/portaladmin/

    ProxyPass https://internal.server.domain:7443/arcgis/

    ProxyPassReverse https://internal.server.domain:7443/arcgis/

&amp;lt;/Location&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The site cannot validate the ArcGIS Server because the application sets internally the URL as &lt;A href="https://ubuntu.dns.com" target="_blank"&gt;https://ubuntu.dns.com&lt;/A&gt;:&lt;STRONG&gt;7443&lt;/STRONG&gt;/portal... Adding the portal's internal port (7443) to the correct DNS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="22020-11-20_11-34-43.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/708i3A7DB72DAFFB163A/image-size/large?v=v2&amp;amp;px=999" role="button" title="22020-11-20_11-34-43.png" alt="22020-11-20_11-34-43.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This also affects the creation of new elements, for example registering a new application in the App Launcher, since the token that internally generates corresponds to: &lt;A href="https://ubuntu.dns.com:7443/portal/portaladmin?f=json&amp;amp;token=SOEj8v9ckAy1_Ye9uLOSGXIqxkAIvwwTq5SpAyph.." target="_blank"&gt;https://ubuntu.dns.com:&lt;STRONG&gt;7443&lt;/STRONG&gt;/portal/portaladmin?f=json&amp;amp;token=SOEj8v9ckAy1_Ye9uLOSGXIqxkAIvwwTq5SpAyph..&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="52020-11-20_11-42-20.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/709iA7EDDB6A97E8102A/image-size/large?v=v2&amp;amp;px=999" role="button" title="52020-11-20_11-42-20.png" alt="52020-11-20_11-42-20.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But something that its fine, its that even having this issues I can click on the federated server (Portal Settings Server), the redirection &amp;amp; tokens works fine, and I can check the manager.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="42020-11-20_11-38-35.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/710iFA1EA08B37BFDC6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="42020-11-20_11-38-35.png" alt="42020-11-20_11-38-35.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 18:07:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/issue-in-the-token-generation-using-a-reverse/m-p/1003566#M28969</guid>
      <dc:creator>lvargas</dc:creator>
      <dc:date>2020-11-20T18:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in the Token Generation using a Reverse Proxy Server (Apache) with Portal</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/issue-in-the-token-generation-using-a-reverse/m-p/1003572#M28970</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/414435"&gt;@lvargas&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I'm surprised since I am seeing no redirection to 7443 on any of the endpoints of my ArcGIS Enterprise deployment behind this proxy.&lt;/P&gt;&lt;P&gt;What if you try appending the correct X-Forwarded-Host header after the 'ProxyAddHeaders Off' statement according to our documented needs for Portal's WebContextURL?&lt;/P&gt;&lt;P&gt;Something like 'Header set X-Forwarded-Host dnsalias.domain.com' in the same section may work.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 18:25:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/issue-in-the-token-generation-using-a-reverse/m-p/1003572#M28970</guid>
      <dc:creator>ChristopherPawlyszyn</dc:creator>
      <dc:date>2020-11-20T18:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in the Token Generation using a Reverse Proxy Server (Apache) with Portal</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/issue-in-the-token-generation-using-a-reverse/m-p/1003608#M28971</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/196643"&gt;@ChristopherPawlyszyn&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the recomendation, it seems that dont have effect.&lt;/P&gt;&lt;P&gt;I have added the parameter, and&amp;nbsp;I restarted the service.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;Location "/portal/"&amp;gt;
    ProxyAddHeaders Off
    Header set X-Forwarded-Host ubuntu.dns.com
...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check, and intertally I can see that rewrites the port to 7443.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="312020-11-20_13-32-00.png" style="width: 928px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/716i2688FD9FBA95CAB3/image-size/large?v=v2&amp;amp;px=999" role="button" title="312020-11-20_13-32-00.png" alt="312020-11-20_13-32-00.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This happens in all the site, for example when the end user logged out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="102020-11-20_13-07-50.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/714i0A54425B7692E385/image-size/large?v=v2&amp;amp;px=999" role="button" title="102020-11-20_13-07-50.png" alt="102020-11-20_13-07-50.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or in Portal when try to validate the federated server.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="202020-11-20_13-09-05.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/715iB357A6F0E6D7C732/image-size/large?v=v2&amp;amp;px=999" role="button" title="202020-11-20_13-09-05.png" alt="202020-11-20_13-09-05.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also tried enabling the proxyaddheaders on and adding the sert x-fordwarded-host header but it doesn't work either (redirects to https://&lt;STRONG&gt;internal.server.domain:7443&lt;/STRONG&gt;/portal/...).&lt;/P&gt;&lt;P&gt;Im trying to doing a port redirection; but I have no luck&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RewriteCond %{SERVER_PORT} 7443&lt;BR /&gt;RewriteRule ^(.*)$ &lt;A href="https://ubuntu.dns.com/$1" target="_blank"&gt;https://ubuntu.dns.com/$1&lt;/A&gt; [R,L]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 19:45:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/issue-in-the-token-generation-using-a-reverse/m-p/1003608#M28971</guid>
      <dc:creator>lvargas</dc:creator>
      <dc:date>2020-11-20T19:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in the Token Generation using a Reverse Proxy Server (Apache) with Portal</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/issue-in-the-token-generation-using-a-reverse/m-p/1004401#M28991</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I share this configuration, in case someone has the same problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;lt;VirtualHost *:443&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ServerName public.dns.com&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;ServerAlias public.dns.com&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ErrorLog ${APACHE_LOG_DIR}/error.log&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;CustomLog ${APACHE_LOG_DIR}/access.log combined&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SSLEngine on&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;SSLProxyEngine On&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SSLCertificateFile&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /etc/ssl/certs/wildcard.crt&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;SSLCertificateKeyFile /etc/ssl/private/wildcard.key&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;lt;Location "/portal"&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProxyPass &lt;A href="https://public.dns.com/portal/home" target="_blank"&gt;https://public.dns.com/portal/home&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;lt;/Location&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;lt;Location "/server"&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProxyPass &lt;A href="https://public.dns.com/server/rest/services" target="_blank"&gt;https://public.dns.com/server/rest/services&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;lt;/Location&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;lt;Location "/portal/"&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RedirectMatch ^/portal/$ &lt;A href="https://public.dns.com/portal/home/" target="_blank"&gt;https://public.dns.com/portal/home/&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProxyPass &lt;A href="https://internal.server.domain:7443/arcgis/" target="_blank"&gt;https://internal.server.domain:7443/arcgis/&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProxyPassReverse &lt;A href="https://internal.server.domain:7443/arcgis/" target="_blank"&gt;https://internal.server.domain:7443/arcgis/&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProxyPassReverse &lt;A href="https://internal.server.domain:7443/portal/" target="_blank"&gt;https://internal.server.domain:7443/portal/&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;lt;/Location&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;lt;Location "/server/"&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RedirectMatch ^/server/$ &lt;A href="https://public.dns.com/server/rest/services" target="_blank"&gt;https://public.dns.com/server/rest/services&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProxyPass &lt;A href="https://cinternal.server.domain:6443/arcgis/" target="_blank"&gt;https://cinternal.server.domain:6443/arcgis/&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProxyPassReverse &lt;A href="https://internal.server.domain:6443/arcgis/" target="_blank"&gt;https://internal.server.domain:6443/arcgis/&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;lt;/Location&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;lt;/VirtualHost&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Its possible validate the federation, click and go to AGS Manager, use Survey123 etc. In the code (using the inspect option) we have two alerts (one related to a token url and one about an image), but the rest works normally.&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/196643"&gt;@ChristopherPawlyszyn&lt;/a&gt;&amp;nbsp;for your comments and ideas.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2020 20:03:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/issue-in-the-token-generation-using-a-reverse/m-p/1004401#M28991</guid>
      <dc:creator>lvargas</dc:creator>
      <dc:date>2020-11-24T20:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in the Token Generation using a Reverse Proxy Server (Apache) with Portal</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/issue-in-the-token-generation-using-a-reverse/m-p/1187574#M33408</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/414435"&gt;@lvargas&lt;/a&gt;&amp;nbsp;we are having a similar issue. We've abandoned use of the web adaptors since we have a reverse proxy server available. However, the documentation for configuring a proxy server on Linux is much to be desired. We still have several instances where /arcgis/ points to&amp;nbsp; /portal/ which have been handled in a config file. This includes handling of new user accounts, REST services, creating feature services, etc.&lt;/P&gt;&lt;P&gt;It doesn't make much sense to have to add so many ProxyPassReverse settings to get the system to function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2022 16:42:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/issue-in-the-token-generation-using-a-reverse/m-p/1187574#M33408</guid>
      <dc:creator>Todd</dc:creator>
      <dc:date>2022-06-29T16:42:43Z</dc:date>
    </item>
  </channel>
</rss>

