I have an Apache reverse proxy that correctly proxies an https internal server. It is configured to use a wildcard self signed certificate and to be a name-based virtual host with ServerName directive.
I am trying to add a second https internal server to proxy, I copied the configuration from the first server, changed ServerName , but it does not work: If I try to connect to the name of the second server, it always proxies me to the first.
Here is the configuration:
NameVirtualHost *:443
<VirtualHost *:443>
ServerAdmin webmaster@siteX.com
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP
SSLCertificateFile /etc/apache2/siteX-cert/wildcard.siteX.com.crt
SSLCertificateKeyFile /etc/apache2/siteX-cert/wildcard.siteX.com.key
SSLCACertificateFile /etc/apache2/siteX-cert/my-ca.crt
ServerName "website.siteX.com"
CustomLog "/var/log/apache2/website.siteX.com-ssl-access.log" combined
ErrorLog "/var/log/apache2/website.siteX.com-ssl-error.log"
# We're not an open proxy
ProxyRequests off
# Proxying is available for anyone
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
# The site we're proxying through
ProxyPass / https://10.3.0.16/
ProxyPassReverse / https://10.3.0.16/
# Allows the proxying of an SSL connection
SSLProxyEngine On
</VirtualHost>
<VirtualHost *:443>
ServerAdmin webmaster@siteX.com
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP
SSLCertificateFile /etc/apache2/siteX-cert/wildcard.siteX.com.crt
SSLCertificateKeyFile /etc/apache2/siteX-cert/wildcard.siteX.com.key
SSLCACertificateFile /etc/apache2/siteX-cert/my-ca.crt
ServerName "website2.siteX.com"
CustomLog "/var/log/apache2/website.siteX.com-ssl-access.log" combined
ErrorLog "/var/log/apache2/website.siteX.com-ssl-error.log"
#We're not an open proxy
ProxyRequests off
# Proxying is available for anyone
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
# The site we're proxying through
ProxyPass / https://10.3.0.26/
ProxyPassReverse / https://10.3.0.26/
# Allows the proxying of an SSL connection
SSLProxyEngine On
</VirtualHost>
Best Answer
I switched to Nginx and managed to get the two https sites working, with a quite simple configuration: