From Boldcore's wiki
Line 8: | Line 8: | ||
Include all vhost addresses in /etc/hosts | Include all vhost addresses in /etc/hosts | ||
− | === VHosts on | + | === VHosts on reverse proxy server === |
Virtual hosts where the webs are actually located must be IP based.<br> | Virtual hosts where the webs are actually located must be IP based.<br> | ||
Each on different IP with different domain name (optional)<br> | Each on different IP with different domain name (optional)<br> | ||
Line 17: | Line 17: | ||
ServerName address.tld | ServerName address.tld | ||
ServerAlias address.tld | ServerAlias address.tld | ||
− | ProxyPass / https:// | + | ProxyPass / https://web.server.address/ |
− | ProxyPassReverse / https:// | + | ProxyPassReverse / https://web.server.address/ |
ProxyRequests Off | ProxyRequests Off |
Latest revision as of 04:44, 7 March 2017
Contents
Working VirtualHost config for reverse proxy
...working on my servers.
Frequent mistakes
Hosts file
Include all vhost addresses in /etc/hosts
VHosts on reverse proxy server
Virtual hosts where the webs are actually located must be IP based.
Each on different IP with different domain name (optional)
With IPv6, this is easy ;))
<VirtualHost address.tld:443> ServerName address.tld ServerAlias address.tld ProxyPass / https://web.server.address/ ProxyPassReverse / https://web.server.address/ ProxyRequests Off ProxyPreserveHost On SSLProxyCheckPeerCN off SSLProxyCheckPeerName off SSLProxyCheckPeerExpire off ## For letsencrypt Include /etc/letsencrypt/options-ssl-apache.conf ## For letsencrypt SSLCertificateFile /etc/letsencrypt/live/address.tld/cert.pem SSLCertificateKeyFile /etc/letsencrypt/live/address.tld/privkey.pem SSLCertificateChainFile /etc/letsencrypt/live/address.tld/chain.pem SSLProxyEngine On </VirtualHost>