[PLUG] apache vhosts + ipv6

Charlie Schluting charlie at schluting.com
Thu Dec 30 21:50:47 UTC 2004


So, I upgraded apache and added ipv6 support.

First, the new apache borked on my VirtualHost style.
I had been doing:
NameVirtualHost *
<VirtualHost *>
options
</VirtualHost>

I had to change the *'s to my IP to make it actually work...

Second, making it listen on my IPv6 interface broke SSL somehow..
After many trials/errors, I came up with:
Listen 0.0.0.0:80
Listen :: 80
<IfDefine SSL>
Listen 0.0.0.0:443
Listen :: 443
</IfDefine>

This works.. finally.
So, when visiting via IPv6 its just serving the default page, not my "main 
page" which happens to be a VirtualHost. I ended up making:
<VirtualHost [2001:470:1f01:ffff::ed]:80> and just pointing it at the correct 
directory.
It all seems to work, but what a pita. I tried listing NameVirtualHost with 
both addrs, and then:
<VirtualHost <ip addr>:80 [2001:470:1f01:ffff::ed]:80>
The docs say this works.. but it again simply serves up the default directory.
I can't seem to make vhosts work with IPv6, is the real issue then.

Is there a way to say "listen on all interfaces, and treat vhosts the same, no 
matter what IP they come from". It should 'just work' like this, with my 
previous configuration of:
Listen *:80
Listen *:443
And vhosts stuff with *

But the newest apache complains that things are being defined more than once if 
you don't use the IP addr, or 0.0.0.0. I'm assuming this is because it is 
trying to "register" a single vhost with both IP addrs. :)

Ideas? Seems like people running vhosts with 2 IP on the same machine should 
have run into the same thing.

-Charlie



More information about the PLUG mailing list