HOW TO
This article is for users who have already installed and configured the Survey123 website in their environment. The Survey123 website installer can be downloaded from the My Esri website for Windows and Linux operating systems. Details for running and configuring the installation can be found in the following article: How To: Install and configure the ArcGIS Survey123 website.
The Survey123 website installer requires administrators to specify HTTP or HTTPS ports when configuring the package on the local infrastructure. By default, the Survey123 website is accessible on HTTP (5080) or HTTPS (5443) port. However, some users require a way to access the website using normal HTTP (80) or HTTPS (443) port. While this can be done by using ArcGIS Web Adaptor for portal or server in ArcGIS Enterprise, the Survey123 website installer relies on a reverse proxy to accomplish this. A reverse proxy is the generic procedure that allows a website to be accessible via a different port or server.
This article describes the steps to set up a reverse proxy for an installed ArcGIS Survey123 website, please refer to the section below for your operating system.
Warning: Consult with the system administrator to see if this approach is suitable for your environment.
Windows:
Requirements
Procedure
<outboundRules> <rule name="update base tag" preCondition="isHTML"> <match filterByTags="Base" pattern="^/(.*)" /> <action type="Rewrite" value="/survey123/" /> <conditions trackAllCaptures="false"> <add input="{URL}" pattern="/" /> </conditions> </rule> <preConditions> <preCondition name="isHTML"> <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" /> </preCondition> </preConditions> </outboundRules>
<rules> <clear /> <rule name="ReverseProxyHTML" stopProcessing="false"> <match url="(^$|.*\.html$)" /> <conditions logicalGrouping="MatchAll" trackAllCaptures="false" /> <action type="Rewrite" url="http://localhost:5080/{R:1}" /> <serverVariables> <set name="HTTP_X_ORIGINAL_ACCEPT_ENCODING" value="{HTTP_ACCEPT_ENCODING}" /> <set name="HTTP_ACCEPT_ENCODING" value="" /> </serverVariables> </rule> <rule name="ReverseProxyInboundRule1" stopProcessing="true"> <match url="(.*)" /> <conditions logicalGrouping="MatchAll" trackAllCaptures="false" /> <action type="Rewrite" url="http://localhost:5080/{R:1}" /> </rule> </rules>
Linux
Requirements:
Given there are numerous Linux distributions, the process for configuring a reverse proxy differs slightly from one to another. These instructions are a basic 'minimum' to access the installed Survey123 website via reverse proxy, and covers the three Linux distributions supported by ArcGIS Enterprise 10.9.1 : Red Hat Enterprise Linux (RHEL) Server, SUSE Linux Enterprise Server (SLES) and Ubuntu Server.
Procedure
sudo getsebool httpd_can_network_connect
sudo /usr/sbin/setsebool -P httpd_can_network_connect 1
RHEL - create a configuration file to load modules:
sudo vim /etc/httpd/conf.modules.d/00-survey123.conf
# This file configures all the modules needed for the Survey123 website: LoadModule proxy_module modules/mod_proxy.so LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so LoadModule proxy_http_module modules/mod_proxy_http.so LoadModule filter_module modules/mod_filter.so LoadModule substitute_module modules/mod_substitute.so
SLES / Ubuntu - enable the modules individually using:
sudo a2enmod proxy sudo a2enmod proxy_http sudo a2enmod filter sudo a2enmod substitute
sudo vim /etc/httpd/conf.d/survey123.conf
SLES - example:
sudo vim /etc/apache2/vhosts.d/survey123.conf sudo vim /etc/apache2/vhosts.d/survey123-ssl.confUbuntu - example using the default site configuration files:
sudo vim /etc/apache2/sites-available/000-default.conf sudo vim /etc/apache2/sites-available/default-ssl.conf
# ------------------------------------ # Survey123 reverse proxy configuration # Enable ProxyPreserveHost - useful for application logging ProxyPreserveHost On # ------------------------------------ # Configure the reverse proxy. Use either A. or B. # ------------------------------------ # A. Reverse proxy over HTTP ProxyPass /survey123 http://localhost:5080 ProxyPassReverse /survey123 http://localhost:5080 RequestHeader add X-ORIGINAL-URI "expr=%{HTTP_HOST}%{REQUEST_URI}" # B. Reverse proxy over SSL: # SSLProxyEngine on # These SSLProxy statements may be needed if Survey123 is using an untrusted certificate # SSLProxyVerify none # SSLProxyCheckPeerName off # SSLProxyCheckPeerCN off # SSLProxyCheckPeerExpire off # ProxyPass /survey123 https://localhost:5443 # ProxyPassReverse /survey123 https://localhost:5443 # RequestHeader add X-ORIGINAL-URI "expr=%{HTTP_HOST}%{REQUEST_URI}" # ------------------------------------ # Filter & update the <base> tag in HTML <Location "/survey123"> AddOutputFilterByType INFLATE;SUBSTITUTE;DEFLATE; text/html text/plain text/xml Substitute 's#"/"#"/survey123/"#ni' </Location> # End Survey123 reverse proxy configuration # ------------------------------------
RHEL
sudo systemctl restart httpd
SLES / Ubuntu
sudo systemctl restart apache2
https://some-machine.domain/survey123
Get help from ArcGIS experts
Download the Esri Support App