Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Apache, vHosts and IPv6.
PostPosted: Thu Sep 08, 2011 9:54 am 
Offline
Senior Newbie

Joined: Sat May 14, 2011 5:28 am
Posts: 14
I'm trying to get my website working with ipv6, however failing miserably for the past couple of days tinkering. I've setup a page here to test http://www.iwader.co.uk/ip.php

I have got apache listening on ipv6 and can be accessed through http://[2002:b24f:a6c3:1000::1]/ successfully viewing the apache default page.

However when it comes viewing my domain, its only then accessed over ipv4, even though the relevant AAAA records are present on an nslookup.

My VirtualHost is listening on *:80. However the fact apache itself seems to be accessible via. ipv6, it leads me to believe this is a problem with my VirtualHost.

Heres the output of the nslookup:

Code:
C:\Users\Wade>nslookup
Default Server:  disco.gogo6.com
Address:  2001:5c0:1000:

> set q=AAAA
> www.iwader.co.uk
Server:  disco.gogo6.com
Address:  2001:5c0:1000:

Non-authoritative answer:
Name:    www.iwader.co.uk
Address:  2002:b24f:a6c3:1000::1


I then have a VirtualHost for both IPv6 and IPv4 after defining both NameVirtualHost in the apache ports.conf.

Code:
NameVirtualHost 178.79.166.195
NameVirtualHost [2002:b24f:a6c3:1000::1]
Listen 178.79.166.195:80
Listen [2002:b24f:a6c3:1000::1]:80


Code:
<VirtualHost 178.79.166.195>
      DocumentRoot /var/www/iwader.co.uk/web

    ServerName iwader.co.uk
    ServerAlias *.iwader.co.uk
    ServerAdmin webmaster@iwader.co.uk


Code:
<VirtualHost [2002:b24f:a6c3:1000::1]>
      DocumentRoot /var/www/iwader.co.uk/web

    ServerName iwader.co.uk
    ServerAlias *.iwader.co.uk
    ServerAdmin webmaster@iwader.co.uk


Top
   
 Post subject:
PostPosted: Thu Sep 08, 2011 10:08 am 
Offline
Linode Staff
User avatar

Joined: Sat Jun 21, 2003 2:21 pm
Posts: 160
Location: Absecon, NJ
I haven't tested this yet, but I think you need to combine the VirtualHost sections when they have the same ServerName. The Apache docs don't seem to cover how to do dual-stack.

Code:
<VirtualHost 178.79.166.195 [2002:b24f:a6c3:1000::1]> 
      DocumentRoot /var/www/iwader.co.uk/web

    ServerName iwader.co.uk
    ServerAlias *.iwader.co.uk
    ServerAdmin webmaster@iwader.co.uk


-James


Top
   
 Post subject:
PostPosted: Thu Sep 08, 2011 1:47 pm 
Offline
Senior Newbie

Joined: Sat May 14, 2011 5:28 am
Posts: 14
irgeek wrote:
I haven't tested this yet, but I think you need to combine the VirtualHost sections when they have the same ServerName. The Apache docs don't seem to cover how to do dual-stack.

Code:
<VirtualHost 178.79.166.195 [2002:b24f:a6c3:1000::1]> 
      DocumentRoot /var/www/iwader.co.uk/web

    ServerName iwader.co.uk
    ServerAlias *.iwader.co.uk
    ServerAdmin webmaster@iwader.co.uk


-James


Hmm still no avial, its only being accessed via. ipv4.

There is a strange side effect though that causes all my clients sites to be redirected to mine, however i can solve this problem by updating the sites vhost with the new NameVirtualHosts. I will do this once i can get my site online for ipv6 and update my clients.


Top
   
 Post subject:
PostPosted: Thu Sep 08, 2011 2:40 pm 
Offline
Senior Member

Joined: Sat May 03, 2008 4:01 pm
Posts: 569
Website: http://www.mattnordhoff.com/
It's using a 6to4 IP address. Clients typically prioritize IPv4 over 6to4, since 6to4 is just IPv4 only with overhead and bad routing. If you were using an HE tunnel, or London had native IPv6 (soon!), clients would prefer IPv6 over IPv4.

_________________
Matt Nordhoff (aka Peng on IRC)


Top
   
 Post subject:
PostPosted: Thu Sep 08, 2011 3:41 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
Is the </VirtualHost> accidentally missing from the copy/paste, or is it not there in the original? I could see omitting the closing tags causing this sort of thing to perhaps happen.

In any case, everything looks fine from here:

Code:
rtucker@witte:~$ curl -4 iwader.co.uk | head
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
101  1628  101  1628    0     0   6150      0 --:--:-- --:--:-- --:--:-- 12149
<!DOCTYPE HTML>
<html lang="en">
   <head>
      <title>iWader - Ramblings of a web developer</title>
      
      <!-- Meta Info -->
      <meta http-equiv="content-type" content="text/html; charset=UTF-8" >
      <meta name="description" content="" >
      <meta name="keywords" content="" >
      <meta name="author" content="Wade Urry" >
rtucker@witte:~$ curl -6 iwader.co.uk | head
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
101  1628  101  1628    0     0   4573      0 --:--:-- --:--:-- --:--:-- 11305
<!DOCTYPE HTML>
<html lang="en">
   <head>
      <title>iWader - Ramblings of a web developer</title>
      
      <!-- Meta Info -->
      <meta http-equiv="content-type" content="text/html; charset=UTF-8" >
      <meta name="description" content="" >
      <meta name="keywords" content="" >
      <meta name="author" content="Wade Urry" >
rtucker@witte:~$ curl -4 www.iwader.co.uk | head
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
101  1628  101  1628    0     0   5394      0 --:--:-- --:--:-- --:--:-- 12149
<!DOCTYPE HTML>
<html lang="en">
   <head>
      <title>iWader - Ramblings of a web developer</title>
      
      <!-- Meta Info -->
      <meta http-equiv="content-type" content="text/html; charset=UTF-8" >
      <meta name="description" content="" >
      <meta name="keywords" content="" >
      <meta name="author" content="Wade Urry" >
rtucker@witte:~$ curl -6 www.iwader.co.uk | head
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
101  1628  101  1628    0     0   5604      0 --:--:-- --:--:-- --:--:-- 13344
<!DOCTYPE HTML>
<html lang="en">
   <head>
      <title>iWader - Ramblings of a web developer</title>
      
      <!-- Meta Info -->
      <meta http-equiv="content-type" content="text/html; charset=UTF-8" >
      <meta name="description" content="" >
      <meta name="keywords" content="" >
      <meta name="author" content="Wade Urry" >

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
 Post subject:
PostPosted: Thu Sep 08, 2011 5:11 pm 
Offline
Senior Newbie

Joined: Sat May 14, 2011 5:28 am
Posts: 14
@hoopycat i only pasted the relevant info from the VirtualHost which is the first couple of lines, the rest of it is just php and logging configurations etc.

However i believe what mnordhoff is correct as i have accessed the page via. lynx and confirms it is accessible via. ipv6.


Top
   
 Post subject:
PostPosted: Thu Sep 08, 2011 10:10 pm 
Offline
Senior Member

Joined: Fri Sep 21, 2007 4:12 pm
Posts: 78
mnordhoff has it.

http://social.technet.microsoft.com/For ... e5d7d9704f

"As per RFC3484 ยง2.1 default policy table, having a 6to4 enabled LAN will mean that 6to4 IPv6 will only be used to communicate to a server if the server is having a 6to4 adress too (ie: 2002: prefix on its address) or if there is no IPv4 address assigned to the server name (ie: no A but an AAAA)."

http://www.ietf.org/rfc/rfc3484.txt

I think that is your problem. It's working as intended, but not as desired in your use case. :)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group