I've been running an Apache 2.0 server for a while with multiple name-
based virtual sites on port 80 and one SSL site on the same IP
address. I need to add a second SSL site and I'm having trouble with
the configuration. I have an available IP Address so that's not a
problem. In /etc/httpd/conf/httpd.conf I have these lines (among many
others, of course):
NameVirtualHost *:80
NameVirtualHost *:443
Then, in the /etc/httpd/conf.d/sslsite.conf file, I have this:
<VirtualHost *:80>
ServerName
www.foobar.com
Redirect /
http://www.foobar.com/
</VirtualHost>
<VirtualHost *:443>
DocumentRoot /path/to/foobar/docs
ServerName
www.foobar.com:443
ServerAdmin hls.TakeThisOut@foobar.com
....
That's working right now.
When I tried to add a second SSL server, however, I get the same
certificate for both, (when I can get anything at all). What I'm
thinking is that the problem comes from the fact that although I have
two public IP Addresses, the router is converting them to the same
private address for use on the server.
To test this, I set everything back to the working (single SSL site)
state. Then I changed the <VirtualHost *:443> line above to
<VirtualHost 198.162.1.2:443>. When I restart apache now, it
complains that NameVirtualHost *:443 has no VirtualHosts but I figured
that's okay but maybe not. When I browse to the site, Firefox gives
me an error message saying:
www.foobar.com has sent an incorrect or unexpected message. Error
Code: -12263
So, that's not right. What should the VirtualHost line have in it?
The public IP Address behaves the same way (Error -12263).
So, first question -- Is the router and single private address at
least part of my problem? If so, I'll create a second for the other
site.
Second question -- What should my apache configuration file look like?
--
HHH