# Apache Reverse Proxy I sometimes setup Apache as a proxy to a third party service to act as a gateway (and not for nefarious middleman purposes). Here is the setup supporting SSL. ## Enable Proxy on Apache ``` $ a2enmod proxy proxy_http ``` ## Setup VHOST ```conf ServerName my-proxy.domain SSLEngine on SSLCertificateFile "/home/foo/ssl/bar.crt" SSLCertificateKeyFile "/home/foo/ssl/bar.pem" # use host as defined here, dont preserve host from the request ProxyPreserveHost off SSLProxyEngine on ProxyPass / https://the-source.domain:443/ ProxyPassReverse / https://the-source:443/ ```