jphillip
December 18th, 2007, 12:43 AM
Hello,
I have apache2 running 4 websites and all have been running perfectly with virtual host setting.
I needed website1.net to have a ssl site set up so I built me a openssl cert and created another virtual host entry and it worked basically perfectly except that if I type https://website2.net, https://website3.net, https://website4.net it will redirect me back to https://website1.net webpages.They all still work fine with just the http:// ...
Any ideas on how to fix this or what I missed.
Below is the code I used to create the virtual host ssl stuff
NameVirtualHost *:80
NameVirtualHost website1.net:443
<VirtualHost *:443>
ServerName www.website1.net
ErrorLog /var/www/website1.net/logs/error.log
SSLEngine On
SSLCertificateFile /etc/apache2/apache.pem
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
DocumentRoot /var/www/website1.net/htdocs
rewriteEngine on
rewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
rewriteRule .* - [F]
</VirtualHost>
<VirtualHost *:80>
ServerAlias *.website1.net
DocumentRoot /var/www/website1.net/htdocs
ServerName website1.net
....
...
...
</VirtualHost>
I have apache2 running 4 websites and all have been running perfectly with virtual host setting.
I needed website1.net to have a ssl site set up so I built me a openssl cert and created another virtual host entry and it worked basically perfectly except that if I type https://website2.net, https://website3.net, https://website4.net it will redirect me back to https://website1.net webpages.They all still work fine with just the http:// ...
Any ideas on how to fix this or what I missed.
Below is the code I used to create the virtual host ssl stuff
NameVirtualHost *:80
NameVirtualHost website1.net:443
<VirtualHost *:443>
ServerName www.website1.net
ErrorLog /var/www/website1.net/logs/error.log
SSLEngine On
SSLCertificateFile /etc/apache2/apache.pem
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
DocumentRoot /var/www/website1.net/htdocs
rewriteEngine on
rewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
rewriteRule .* - [F]
</VirtualHost>
<VirtualHost *:80>
ServerAlias *.website1.net
DocumentRoot /var/www/website1.net/htdocs
ServerName website1.net
....
...
...
</VirtualHost>