Reverse proxy configuration
For Apache 2.4, a minimal reverse proxy configuration would include the following parameters within the apache configuration file (httpd.conf):Note that:
- This is not a complete configuration web server configuration, it only illustrates the specific parts pertaining to the reverse proxy. The above configuration would typically be inserted into an appropriate
<VirtualHost>block.- See ProxyPass documentation for more information.
- See ProxyPassReverse documentation for more information.
- The above requires the Apache
mod_proxyandmod_proxy_httpmodules to be enabled. These modules are typically included in most Apache installations, but may need to be enabled.- See the full Apache documentation regarding
mod_proxy
- See the full Apache documentation regarding
- The
**<apish>**placeholders in theProxyPassandProxyPassReversestatements should be replaced with the DNS address or IP address (preferred) of the API Self-hosted installation.
TLS termination configuration
For the scenario where TLS termination is being performed by the reverse proxy, in addition to the required APISH configuration, the Apache configuration file would be modified as follows:Note that:
- The
ProxyPassandProxyPassReversestatements are now usinghttpinstead ofhttps. - We use the
RemoteIPHeadersetting to pass through the IP of the client to the APISH box in theX-Forwarded-Forheader. This requires themod_remoteipmodule be enabled. This is not required, but is recommended.- See the full Apache documentation regarding
mod_remoteip
- See the full Apache documentation regarding
- We set the
X-Forwarded-Protoheader tohttpsto indicate to APISH that the original connection is secure. This requires themod_headersmodule and is required.