httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Howard <ttip...@gmail.com>
Subject [users@httpd] mixed virtual not working in IPv6
Date Tue, 10 Aug 2010 20:23:37 GMT
This works in IPv4. I can designate an IP address in NameVirtualHost,
and specify one of the virtual hosts with the IP address on ServerName
or ServerAlias.  That then works to respond to requests that use the
IP address as the hostname (via HTTP Host:).  It would typically be
used as a catch-all menu or for hidden files.

For IPv6 this fails.  Web browsers do IPv6 just fine, sending the IPv6
address through Host: and enclosed in [].  It appears that ServerName
and ServerAlias don't know how to parse IPv6 with the [] form.

Now appearances can be deceiving.  Documentation is certainly lacking
(the relevant virtual host documents make no mention of IPv6 at all).
Maybe it isn't a parse issue, but rather, that a different syntax is
used for an IPv6 address on ServerName to more gracefully deal with
the colons in IPv6 addresses.  I really don't know what the issue is.
What I know is, it fails to work with what I thought was the obvious
extrapolation into IPv6 from the working example in IPv4.

Here is part of the config that works:

Listen 172.30.16.6:80
NameVirtualHost 172.30.16.6:80
<VirtualHost 172.30.16.6:80>
        ServerName 172.30.16.6
        DocumentRoot /home/pub/172.30.16.6
        <Directory /home/pub/172.30.16.6/>
                Options +FollowSymLinks
                AllowOverride All
                order allow,deny
                allow from 172.30.0.0/16
        </Directory>
</VirtualHost>
<VirtualHost 172.30.16.6:80>
        ServerName meitner
        DocumentRoot /home/pub/meitner-v4
        <Directory /home/pub/meitner-v4/>
                Options +FollowSymLinks
                AllowOverride All
                order allow,deny
                allow from 172.30.0.0/16
        </Directory>
</VirtualHost>

Here is part of the config that fails, in the form I thought most
likely to succeed, although I have attempted a number of variations:

Listen [fcca::1006]:80
NameVirtualHost [fcca::1006]:80
<VirtualHost [fcca::1006]:80>
        ServerName [fcca::1006]
        DocumentRoot /home/pub/fcca::1006
        <Directory /home/pub/fcca::1006/>
                Options +FollowSymLinks
                AllowOverride All
                order allow,deny
                allow from fcc0::/12
        </Directory>
</VirtualHost>
<VirtualHost [fcca::1006]:80>
        ServerName meitner
        DocumentRoot /home/pub/meitner-v6
        <Directory /home/pub/meitner-v6/>
                Options +FollowSymLinks
                AllowOverride All
                order allow,deny
                allow from fcc0::/12
        </Directory>
</VirtualHost>

Note, these are all private LAN addresses, and they are the actual
addressing being used.  Next is the error message, which sure seems to
me to suggest that it isn't applying any parsing of IPv6 addresses,
but is parsing for port numbers (wrong for IPv6, as it turns out):

start apache2:  * Starting web server apache2
start apache2: Syntax error on line 4 of /etc/apache2/sites-enabled/000-meitner:
start apache2: The port number "[fcca::1006]" is outside the
appropriate range (i.e., 1..65535).
start apache2:    ...fail!

Now I don't know which question is the right one to ask:

1.  Is Apache2 supposed to be fully IPv6 ready, now?
2.  Is this part of the IPv6 implementation that slipped through the cracks?
3.  Is there some special new syntax for this case that hasn't been
added to the virtual hosts docs, yet?
4.  Has this ability been depricated (it still works in Apache2 for
IPv4 and I use it a lot but am now deploying IPv6 and can't get it to
work)?
5.  How do I make it work?

-- 
sHiFt HaPpEnS!

---------------------------------------------------------------------
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