apache reverse proxy subfolder code example
Example 1: apache reverse proxy
<VirtualHost *:80>
ServerName domain.tld
ServerAlias www.domain.tld
ProxyRequests Off
ProxyPass / http://123.456.7.89/
ProxyPassReverse / http://123.456.7.89/
</VirtualHost>mixed
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>