[vox-tech] Setting up VirtualHosts
Jay Strauss
vox-tech@lists.lugod.org
Wed, 14 May 2003 12:54:12 -0500
Hi,
I'm googling all over, trying everything, and can't get this to work. My
server works both ssl/clear text (from before I started messing with this).
I want my server to respond to:
testwww.heyjay.com
www.heyjay.com
testssl.heyjay.com
ssl.heyjay.com
this way I can have a development and production enviroment, ssl and non
ssl. I get a "server error" when I try with all the addresses. All the
above addresses resolve to the same address (we'll not yet because dns
hasn't propogated, so i'm using my hosts file (but that's besides the
point)). I can NOT get this httpd.conf (or variations) to work. I'm sure
I'm doing something stupid (or uninformed). Could someone give me a hand:
NameVirtualHost *
<VirtualHost testwww.heyjay.com:80>
ServerName testwww.heyjay.com
SSLEngine off
DocumentRoot /var/www/heyjay/testwww
</VirtualHost>
<VirtualHost www.heyjay.com:80>
ServerName www.heyjay.com
SSLEngine off
DocumentRoot /var/www/heyjay/www
</VirtualHost>
<VirtualHost testssl:443>
ServerName testssl.heyjay.com
DocumentRoot /var/www/heyjay/testssl
SSLEngine on
SSLCertificateFile server.crt
SSLCertificateKeyFile server.key
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
</VirtualHost>
<VirtualHost ssl.heyjay.com:443>
ServerName ssl.heyjay.com
DocumentRoot /var/www/heyjay/ssl
SSLEngine on
SSLCertificateFile server.crt
SSLCertificateKeyFile server.key
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
</VirtualHost>