Re: Enabling SSL on VirtualHosts Revisited

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux