apache proxy soxkets code example
Example 1: apache proxy pass after domain
ProxyPreserveHost On
ProxyPass / http://127.0.0.1/host2/
ProxyPassReverse / http://127.0.0.1/host2/
Example 2: apache reverse proxy
<IfModule mod_ssl.c>
<VirtualHost *:443 *:80>
ServerAdmin [email protected]
ServerName example.com
SSLProxyEngine on
ProxyPreserveHost On
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ProxyPass / http://127.0.0.1:5000/
ProxyPassReverse / http://127.0.0.1:5000/
ServerName example.com
SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
ProxyRequests Off
</VirtualHost>
</IfModule>