Skip To Content

Set up a reverse proxy server with ArcGIS Notebook Server

A reverse proxy server is a computer that is deployed within a perimeter network (also known as a demilitarized zone [DMZ] or screened subnet) that handles requests from the Internet and forwards them to the machines in your internal network. By forwarding requests, the reverse proxy server masks the identity of the machines behind your organization's firewall, protecting internal machines from direct attack by Internet users. Additional security functions can be implemented in the reverse proxy server to further protect your internal network from outside users.

You can configure your ArcGIS Notebook Server site to use your organization's reverse proxy server. This is an optional step. If your organization does not use a reverse proxy, or if you don't want to configure your ArcGIS Notebook Server site to use one, you can proceed to configure your site with a portal now.

Add ArcGIS Notebook Server to your reverse proxy server

Your organization's reverse proxy server can be configured to communicate either directly with ArcGIS Notebook Server or via ArcGIS Web Adaptor by adding the corresponding URLs to the proxy directives.

For example, if you're using Apache as a reverse proxy server, you need to add the ArcGIS Notebook Server URL or the ArcGIS Web Adaptor URL to the ProxyPass directives in the Apache web server configuration file httpd.conf as follows:

If communicating through ArcGIS Web Adaptor

ProxyPass /notebook https://notebookserver.domain.com/notebook
ProxyPassReverse /notebook https://notebookserver.domain.com/notebook

If directly communicating with ArcGIS Server

ProxyPass /arcgis https://notebookserver.domain.com:11443/arcgis
ProxyPassReverse /arcgis https://notebookserver.domain.com:11443/arcgis

Set the WebContextURL property

If you're using a reverse proxy server and the URL to your site does not end with the default string /arcgis (all lowercase), you should also set the ArcGIS Notebook Server WebContextURL property. This helps ArcGIS Notebook Server construct the correct URLs on the resources it sends to the end user.

Note:

If you've configured ArcGIS Web Adaptor with your site, use the WebContextURL property to set the ArcGIS Notebook Server URL to match that of its ArcGIS Web Adaptor (such as /notebook). If there is no Web Adaptor configured, the site URL should end in /arcgis to avoid potential URL redirect issues.

Do the following to change the WebContextURL property:

  1. Sign in to the ArcGIS Notebook Server Administrator Directory at https://notebookserver.domain.com:11443/arcgis/admin as a user with administrator privileges.
  2. Click system > properties > update.
  3. In the Properties text box, insert the following JSON, substituting your own ArcGIS Notebook Server URL as seen by users outside your organization's firewall:
    {
       "WebContextURL": "https://notebookserver.domain.com/notebook"
    }
  4. Click Update.
  5. Restart ArcGIS Notebook Server. On Windows, restart the ArcGIS Server Windows service.

Reverse proxy headers and ArcGIS Notebook Server

When integrating your reverse proxy with ArcGIS Notebook Server or ArcGIS Web Adaptor, be aware that both of these components expect to find the following property set in the header sent by the reverse proxy server:

X-Forwarded-Host=<FQDN of reverse proxy server>

If this property is set in the header, ArcGIS Notebook Server and ArcGIS Web Adaptor will return requests to the reverse proxy server that match the reverse proxy server's URL. For example, a request to the ArcGIS Notebook Server Services Directory (https://reverseproxy.domain.com/arcgis/rest/services) will be returned to the client as the same URL.

If the X-Forwarded-Host header property is not set, ArcGIS Notebook Server and ArcGIS Web Adaptor may return the URL of the internal machine where the request was directed, for example, https://notebookserver.domain.com/arcgis/rest/services instead of https://reverseproxy.domain.com/arcgis/rest/services. This is problematic, as clients will not be able to access this URL (commonly noted as a browser 404 error). Also, the client will gain some knowledge about the internal machine.

When troubleshooting communication between clients and ArcGIS Notebook Server or ArcGIS Web Adaptor, it is recommended that you set the X-Forwarded-Host header property in the reverse proxy server, as this is a common cause of communication failures. The way you set this header varies depending on your reverse proxy server implementation. For example, Apache accomplishes this with the ProxyPreserveHost On directive in its configuration as follows:

...
ProxyPreserveHost On
ProxyPass /notebook https://notebookserver.domain.com/notebook
ProxyPassReverse /notebook https://notebookserver.domain.com/notebook
...

For guidance on how to pass the original host header, see the product documentation for your reverse proxy server.