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_proxyΒ andΒmod_proxy_httpΒ modules 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 theΒProxyPassΒ andΒProxyPassReverseΒ statements 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Β
ProxyPassΒ andΒProxyPassReverseΒ statements are now usingΒhttpΒ instead ofΒhttps. - We use theΒ
RemoteIPHeaderΒ setting to pass through the IP of the client to the APISH box in theΒX-Forwarded-ForΒ header. This requires theΒmod_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-ProtoΒ header toΒhttpsΒ to indicate to APISH that the original connection is secure. This requires theΒmod_headersΒ module and is required.