Skip to main content
This documentation is for API Self-Hosted Version 2 (Legacy)Version 2 is a legacy deployment model. All new customers must use Version 3, which features a modern multi-container architecture with improved security and performance.πŸ‘‰ Get started with API Self-Hosted v3
This article aims to provide configuration examples using a Apache server for both reverse proxy and TLS terminationΒ to achieve a reverse proxy server.Β 

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.
  • 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.
  • 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_remoteip module be enabled. This is not required, but is recommended.
  • 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.