httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Gingras <francois.ging...@gmail.com>
Subject Re: [users@httpd] Enabling SSL on VirtualHosts Revisited
Date Fri, 18 Dec 2009 15:30:09 GMT
Jonathan Mast wrote:
> There's a problem with the 2 VirtualHost entries I had to add for SSL.  Now
> every request to httpd is being handled by these VirtualHosts, even requests
> for with hostnames that don't match them.
>
> Here's my current config:
>
> <VirtualHost *>
>     ServerName blah.mysite.com
>     ...
>
> <VirtualHost foo.mysite.com:80>
>     ServerName foo.mysite.com
>     ...
>
> <VirtuaHost foo.mysite.com:443>
>     ServerName foo.mysite.com
>     ...
>     SSL stuff
>
> <VirtualHost *>
>     ServerName bar.othersite.com
>     ...
>
> Since added the 2 for foo.mysite.com, EVERY request is handled by
> foo.mysite.com, even those for blah.mysite.com and bar.mysite.com.  Even
> after changing the first one to <VirtualHost blah.mysite.com:80>, httpd
> would still try to use foo.mysite.com for http://blah.mysite.com/test.html!
> !!
>
> Any ideas?
>
> httpd 2.2
>
>   
Hello Jonathan,

You should only use <VirtualHost *:PORT> or <VirtualHost IP:PORT> when 
setting up vhosts.

Also, you'll need a NameVirtualHost that matches that IP:PORT if you use 
more than one virtual host on that port.

Finally, when doing name-based vhosts with SSL, note that the 
certificate for the first listed virtual host will always be used, 
unless you implement SNI.

Frank.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message