Skip to main content

Setup a mirror for test-ipv6.com

I decided to host a public mirror for test-ipv6.com, you can find my mirror at test-ipv6.websters-computers.com.
You can find out about becoming a mirror on there wiki and they have some setup instructions but was missing a few steps, so here's how i did it.
Note: This works for me on linux centos 5.x may not work the same on other systems.

Prerequisites
IPv6 - First off you need to have a working IPv6 connection as multiple test are run against your IPv6 address.

DNS - You will need a domain name, or a sub-domain off of your existing domain name.
You need Full control of DNS for that domain/sub-domain and you will need to be able to create new DNS authoritative servers, specifically for the project, for one of the tests. If you use the same host, you need to set up this second instance of your DNS server in such a way that it gets unique configuration, unique IP address, and unique zone data, from your main DNS instance. (i used a separate server for this)

yuicompressor - yuicompressor is used to clean and minimize JavaScript and Cascading Style Sheets. The resulting output will have all comments removed, variable names shortened, and white-space removed as much as possible. This is to reduce the file size both for performance as well as bandwidth costs.
java is required by yuicompressor.
So go download a copy (current version 2.4.2) extract the files and copy the file "yuicompressor-2.4.2.jar" (found in the build folder) to "/usr/local/share/yuicompressor" you may need to to create the folder first. Then rename "yuicompressor-2.4.2.jar" to "yuicompressor.jar".

Tidy - Tidy is used to both validate and pretty-print HTML. Any parsing errors will produce noise on the screen and the resulting output will be properly normalized.
To install run "yum install tidy".

Apache and PHP - Apache "httpd". Any version is OK; but for best results, version 2.2.x is recommended. Modules needed: mod_headers, mod_expires, mod_env, mod_usertrack, mod_rewrite.
You will also need Apache's apxs tool. To install run "yum install httpd-devel".

PHP 5.2 or higher. As centos 5.x ships with PHP 5.1.6 you will need to get an updated package from a 3rd party repo, see adding repos on how to do this.
If you want the stats graphs to work you also need rrdtool. to install run "yum install rrd*"

Perl and perl modules - Perl is used for taking the fragments of HTML, JavaScript, and CSS, and combining them into their published forms.
The Template module specifically is called from perl to expand specific input files, do substitution (based on your configuration file), and produce the final versions of HTML, JavaScript, and CSS.
You will need to install this, i used cpan.
Other modules needed: YAML, YAML::Syck, and JSON. just run "yum install perl-YAML* perl-JSON".

Subversion - Subversion is used to get the files required. To install run "yum install subversion".

Installation
First thing to setup is DNS, you should know what site name you will want this test to go on. The primary site uses "test-ipv6.com". You might instead use "test-ipv6.example.com" (i used test-ipv6.websters-computers.com and that's what i will use through the rest of this setup).

DNS for this domain will need to have several records. The IP addresses you use will need to match those of the web server you plan on using, both for IPv4 and IPv6.

If using a sub-domain you will need to insure you delegate the zone correctly so people know where your zone records are. I added (see below) to my main domain.

test-ipv6.websters-computers.com.	IN	NS	ns1.websters-computers.com.
test-ipv6.websters-computers.com.	IN	NS	ns2.websters-computers.com.
test-ipv6.websters-computers.com.	IN	NS	ns3.websters-computers.com.
test-ipv6.websters-computers.com.	IN	NS	ns4.websters-computers.com.

Here's test-ipv6.websters-computers.com records, you will need to modify it for your DNS servers NS records, A records, AAAA records and domain name.

$ttl 15M
test-ipv6.websters-computers.com.  IN	SOA  ns1.websters-computers.com. webmaster.websters-computers.com. ( 
			2011032802
			1H
			15M
			2W
			1H )
test-ipv6.websters-computers.com.      IN NS  ns1.websters-computers.com.
test-ipv6.websters-computers.com.      IN NS  ns2.websters-computers.com.
test-ipv6.websters-computers.com.      IN NS  ns3.websters-computers.com.
test-ipv6.websters-computers.com.      IN NS  ns4.websters-computers.com.
v6ns.test-ipv6.websters-computers.com. IN NS  v6ns1.test-ipv6.websters-computers.com.
 
test-ipv6.websters-computers.com.	        IN	A	94.76.234.237
www.test-ipv6.websters-computers.com.	        IN	A	94.76.234.237
www4.test-ipv6.websters-computers.com.    	IN	A	94.76.234.237
ipv4.test-ipv6.websters-computers.com.	        IN	A	94.76.234.237
ds.test-ipv6.websters-computers.com.	        IN	A	94.76.234.237
a.test-ipv6.websters-computers.com.	        IN	A	94.76.234.237
v4.test-ipv6.websters-computers.com.	        IN	A	94.76.234.237
beta.test-ipv6.websters-computers.com.	        IN	A	94.76.234.237
archives.test-ipv6.websters-computers.com.	IN	A	94.76.234.237
 
ipv6.test-ipv6.websters-computers.com.      IN AAAA 2001:470:1f09:15a4::100b
ds.test-ipv6.websters-computers.com.        IN AAAA 2001:470:1f09:15a4::100b
aaaa.test-ipv6.websters-computers.com.      IN AAAA 2001:470:1f09:15a4::100b
v6.test-ipv6.websters-computers.com.        IN AAAA 2001:470:1f09:15a4::100b
beta.test-ipv6.websters-computers.com.      IN AAAA 2001:470:1f09:15a4::100b
archives.test-ipv6.websters-computers.com.  IN AAAA 2001:470:1f09:15a4::100b
v6ns1.test-ipv6.websters-computers.com.     IN AAAA 2001:470:1f09:81e:21a:4dff:fe73:8a9b
buggydns1.test-ipv6.websters-computers.com. IN AAAA 5e4a:f49a:5e4a:f49a:5e4a:f49a:5e4a:f49a

Now to setup The IPv6-only DNS server. Operationally, this may be easier on separate hardware, or at least in separate virtual machines. (i did this on a separate server)
Here's v6ns.test-ipv6.websters-computers.com records, you will need to modify it to your setup.

$ttl 38400
@	IN	SOA	v6ns.test-ipv6.websters-computers.com. webmaster.websters-computers.com. (
			2011032603
			10800
			3600
			604800
			38400 )
         IN NS v6ns1.test-ipv6.websters-computers.com.
 
 IN A 94.76.234.237
www IN A 94.76.234.237
www4 IN A 94.76.234.237
ipv4 IN A 94.76.234.237
ds IN A 94.76.234.237
a IN A 94.76.234.237
v4 IN A 94.76.234.237
beta IN A 94.76.234.237
archives IN A 94.76.234.237
 
 IN AAAA 2001:470:1f09:15a4::100b
www IN AAAA 2001:470:1f09:15a4::100b
ipv6 IN AAAA 2001:470:1f09:15a4::100b
ds IN AAAA 2001:470:1f09:15a4::100b
aaaa IN AAAA 2001:470:1f09:15a4::100b
v6 IN AAAA 2001:470:1f09:15a4::100b
beta IN AAAA 2001:470:1f09:15a4::100b
archives IN AAAA 2001:470:1f09:15a4::100b


and finally here's v6ns1.test-ipv6.websters-computers.com records, you will need to modify it to your setup.

$ttl 38400
v6ns1.test-ipv6.websters-computers.com.	IN	SOA	v6ns1.test-ipv6.websters-computers.com. webmaster.websters-computers.com. (
			2011032602
			10800
			3600
			604800
			38400 )
v6ns1.test-ipv6.websters-computers.com. IN NS v6ns1.test-ipv6.websters-computers.com.
 
v6ns1.test-ipv6.websters-computers.com. IN AAAA 2001:470:1f09:81e:21a:4dff:fe73:8a9b

Now we need to create a new user, as i use virtualmin its easy i just add the domain i want and it creates the user and apache settings. The users home directory is "/home/test-ipv6.websters-computers.com".

Now login as the new user and create a new folder called "falling-sky-read-only"
then run

svn checkout http://falling-sky.googlecode.com/svn/trunk/ falling-sky-read-only

this will download all the files needed.

Now to build the mod_ip module for apache.

cd /home/test-ipv6.websters-computers.com/falling-sky-read-only/mod_ip
su apxs -c -i -a mod_ip.c


After this is done, you will want to check your Apache configuration. Make sure that mod_ip is loading. After that, you can restart your Apache web server. Look for "LoadModule mod_ip_module" in your "httpd.conf".

Now to setup Apache's virtual host
The virtual host configuration can be a bit complex. We are using quite a few features to make this do everything wanted.
Note: This need to be the first virtual server for the IP address you are using (only effects you if you have more than one site on the ip address).
here's my virtual host for test-ipv6.websters-computers.com, you will need to modify it to your setup as a few parts are specific to my server, compare to the official docs.

<VirtualHost 94.76.234.237:80 [2001:470:1f09:15a4::100b]:80>
SuexecUserGroup "#528" "#508"
ServerName test-ipv6.websters-computers.com
ServerAlias www.test-ipv6.websters-computers.com
DocumentRoot /home/test-ipv6.websters-computers.com/public_html
serveralias test-ipv6.websters-computers.com *.test-ipv6.websters-computers.com
ErrorLog /var/log/virtualmin/test-ipv6.websters-computers.com_error_log
CustomLog /var/log/virtualmin/test-ipv6.websters-computers.com_access_log combined
ScriptAlias /cgi-bin/ /home/test-ipv6.websters-computers.com/cgi-bin/
ScriptAlias /awstats/ /home/test-ipv6.websters-computers.com/cgi-bin/
DirectoryIndex index.html index.html index.htm index.php index.php4 index.php5
<Directory "/home/test-ipv6.websters-computers.com/public_html">
Options +ExecCGI +FollowSymLinks +IncludesNOEXEC -Indexes +MultiViews
allow from all
AddHandler fcgid-script .php
AddHandler fcgid-script .php5
FCGIWrapper /home/test-ipv6.websters-computers.com/fcgi-bin/php5.fcgi .php
FCGIWrapper /home/test-ipv6.websters-computers.com/fcgi-bin/php5.fcgi .php5
AddDefaultCharset UTF-8
LanguagePriority en-us en
ForceLanguagePriority prefer fallback
 
AddLanguage de .de
AddLanguage el-GR .el-gr
AddLanguage en .en-us
AddLanguage en-PL .en-pl
AddLanguage en-us .en-us
AddLanguage fr .fr
AddLanguage fr-CA .fr-ca
AddLanguage hu-HU .hu-hu
AddLanguage it .it-IT
AddLanguage it-IT .it-IT
AddLanguage nl-NL .nl-nl
AddLanguage pt-BR .pt-br
AddLanguage sl-SI .sl-si
AddLanguage sl-SI .sl-si
AddLanguage sv .sv
AddLanguage zh-CN .zh-cn
AddLanguage zh-HK .zh-hk
AddLanguage zh-TW .zh-tw
</Directory>
# Enable etags.  Improve cachability of
# most stuff.
FileETag MTime
 
# Apache built in cookie tracking.
# We use this to record only the most recent submission from a given browser,
# to avoid stuffing the ballot box on the survey.
CookieExpires "24 hours"
CookieStyle RFC2109
CookieTracking on
 
# This virtualhost requires RewriteEngine
RewriteEngine on
 
# Cache Busting the javascript code
# Each time we update index.html, we do this:
#   <script type="text/javascript" src="/v71/index.js">
# This is to force the browser to fetch any updated javascript.
# We do a similiar thing for CSS.
# This RewriteRule will see /v71 and strip it from the request.
RewriteRule ^/v[0-9]+(/.*)$ $1 [N]
 
# Our build.pl script will generate precompressed versions
# of our HTML, JS, and CSS; and store the compressed versions
# on disk.  We want to serve these directly to users who support
# compression.  This avoids having Apache do compresion on-the-fly,
# lowering the load on the web server.
AddType text/html;charset=UTF-8 .htmlgz .html
AddType "text/javascript;charset=UTF-8" .jsgz .js
AddType text/css;charset=UTF-8 .cssgz .css
AddEncoding gzip .htmlgz
AddEncoding gzip .jsgz
AddEncoding gzip .cssgz
 
# If the browser supports gzip, redirect users
# of these file types to the compressed versions.
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteRule (.*)\.html$ $1\.htmlgz [L]
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteRule (.*)\.css$ $1\.cssgz [L]
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteRule (.*)\.js$ $1\.jsgz [L]
 
# mod_ip - reports IP address.  CGI arguements: callback= and fill=
# This is a custom module in the test-ipv6.com archive.
# This was implemented as a module for performance reasons.
# /ip/ is *the* single most requested element (6 or more times per test!)
# Comment out of mod_ip is not installed per the falling-sky
# install documentation.
<LocationMatch ^/ip/?$>
 SetHandler mod_ip
 Header append Cache-Control no-cache
 Header append Pragma no-cache
 Header append Expires "Thu, 01 Jan 1971 00:00:00 GMT"
	mod_ip_prefix 2001::/32 "Teredo"
	mod_ip_prefix 2002::/16 "6to4"
	mod_ip_prefix 2001:470::/32 "he.net or tunnelbroker.net"
	mod_ip_prefix 2001:55c::/32 "Comcast"
	mod_ip_prefix 2001:888::/32 "XS4ALL"
	mod_ip_prefix 2001:5c0::/32 "freenet6"
	mod_ip_prefix 2001:1291:200::/48 "brudi01.sixxs.net ctbc"
	mod_ip_prefix 2001:1291:200::/40 "brudi01.sixxs.net ctbc"
	mod_ip_prefix 2001:1418:100::/48 "ittrn01.sixxs.net itgate"
	mod_ip_prefix 2001:1418:100::/40 "ittrn01.sixxs.net itgate"
	mod_ip_prefix 2001:14b8:100::/48 "fihel01.sixxs.net dna"
	mod_ip_prefix 2001:14b8:100::/40 "fihel01.sixxs.net dna"
	mod_ip_prefix 2001:15c0:65ff::/48 "simbx01.sixxs.net amis"
	mod_ip_prefix 2001:15c0:6600::/40 "simbx01.sixxs.net amis"
	mod_ip_prefix 2001:15c0:6700::/40 "simbx01.sixxs.net amis"
	mod_ip_prefix 2001:1620:f00::/48 "chzrh02.sixxs.net init7"
	mod_ip_prefix 2001:1620:f00::/40 "chzrh02.sixxs.net init7"
	mod_ip_prefix 2001:16d8:cc00::/40 "sesto01.sixxs.net phonera"
	mod_ip_prefix 2001:16d8:dd00::/48 "dkcph01.sixxs.net phonera"
	mod_ip_prefix 2001:16d8:dd00::/40 "dkcph01.sixxs.net phonera"
	mod_ip_prefix 2001:16d8:ee00::/48 "noosl01.sixxs.net phonera"
	mod_ip_prefix 2001:16d8:ee00::/40 "noosl01.sixxs.net phonera"
	mod_ip_prefix 2001:16d8:ff00::/48 "sesto01.sixxs.net phonera"
	mod_ip_prefix 2001:16d8:ff00::/40 "sesto01.sixxs.net phonera"
	mod_ip_prefix 2001:1938:100::/40 "usdal01.sixxs.net highwinds"
	mod_ip_prefix 2001:1938:200::/40 "usphx01.sixxs.net highwinds"
	mod_ip_prefix 2001:1938:80::/48 "usdal01.sixxs.net highwinds"
	mod_ip_prefix 2001:1938:81::/48 "usphx01.sixxs.net highwinds"
	mod_ip_prefix 2001:1af8:fe00::/48 "nlhaa01.sixxs.net leaseweb"
	mod_ip_prefix 2001:1af8:fe00::/40 "nlhaa01.sixxs.net leaseweb"
	mod_ip_prefix 2001:1af8:ff00::/40 "nlhaa01.sixxs.net leaseweb"
	mod_ip_prefix 2001:41e0:ff00::/48 "chzrh01.sixxs.net ipman"
	mod_ip_prefix 2001:41e0:ff00::/40 "chzrh01.sixxs.net ipman"
	mod_ip_prefix 2001:4428:200::/48 "nzwlg01.sixxs.net acsdata"
	mod_ip_prefix 2001:4428:200::/40 "nzwlg01.sixxs.net acsdata"
	mod_ip_prefix 2001:4830:1100::/48 "usbos01.sixxs.net occaid"
	mod_ip_prefix 2001:4830:1100::/40 "usbos01.sixxs.net occaid"
	mod_ip_prefix 2001:4830:1600::/48 "usqas01.sixxs.net occaid"
	mod_ip_prefix 2001:4830:1600::/40 "usqas01.sixxs.net occaid"
	mod_ip_prefix 2001:4978:100::/40 "uschi02.sixxs.net yourorg"
	mod_ip_prefix 2001:4978:200::/40 "uschi02.sixxs.net yourorg"
	mod_ip_prefix 2001:4978:300::/40 "uschi02.sixxs.net yourorg"
	mod_ip_prefix 2001:4978:400::/40 "uschi02.sixxs.net yourorg"
	mod_ip_prefix 2001:4978:f::/48 "uschi02.sixxs.net yourorg"
	mod_ip_prefix 2001:4dd0:fc00::/40 "decgn01.sixxs.net netcologne"
	mod_ip_prefix 2001:4dd0:fd00::/40 "decgn01.sixxs.net netcologne"
	mod_ip_prefix 2001:4dd0:fe00::/40 "decgn01.sixxs.net netcologne"
	mod_ip_prefix 2001:4dd0:ff00::/48 "decgn01.sixxs.net netcologne"
	mod_ip_prefix 2001:4dd0:ff00::/40 "decgn01.sixxs.net netcologne"
	mod_ip_prefix 2001:610:600::/48 "nlams05.sixxs.net surfnet"
	mod_ip_prefix 2001:610:600::/40 "nlams05.sixxs.net surfnet"
	mod_ip_prefix 2001:610:700::/40 "nlams05.sixxs.net surfnet"
	mod_ip_prefix 2001:6a0:100::/40 "plwaw01.sixxs.net icm"
	mod_ip_prefix 2001:6a0:200::/48 "plwaw01.sixxs.net icm"
	mod_ip_prefix 2001:6a8:200::/48 "bebru02.sixxs.net belnet"
	mod_ip_prefix 2001:6a8:200::/40 "bebru02.sixxs.net belnet"
	mod_ip_prefix 2001:6f8:1000::/40 "deham01.sixxs.net easynet"
	mod_ip_prefix 2001:6f8:1100::/40 "deham01.sixxs.net easynet"
	mod_ip_prefix 2001:6f8:1200::/40 "deham01.sixxs.net easynet"
	mod_ip_prefix 2001:6f8:1300::/40 "deham01.sixxs.net easynet"
	mod_ip_prefix 2001:6f8:1400::/40 "bebru01.sixxs.net easynet"
	mod_ip_prefix 2001:6f8:1c00::/48 "deham02.sixxs.net easynet"
	mod_ip_prefix 2001:6f8:1c00::/40 "deham02.sixxs.net easynet"
	mod_ip_prefix 2001:6f8:1d00::/40 "deham02.sixxs.net easynet"
	mod_ip_prefix 2001:6f8:202::/48 "bebru01.sixxs.net easynet"
	mod_ip_prefix 2001:6f8:300::/40 "bebru01.sixxs.net easynet"
	mod_ip_prefix 2001:6f8:900::/48 "deham01.sixxs.net easynet"
	mod_ip_prefix 2001:6f8:900::/40 "deham01.sixxs.net easynet"
	mod_ip_prefix 2001:770:100::/48 "iedub01.sixxs.net heanet"
	mod_ip_prefix 2001:770:100::/40 "iedub01.sixxs.net heanet"
	mod_ip_prefix 2001:7b8:1500::/40 "nlede01.sixxs.net bit"
	mod_ip_prefix 2001:7b8:2ff::/48 "nlede01.sixxs.net bit"
	mod_ip_prefix 2001:7b8:300::/40 "nlede01.sixxs.net bit"
	mod_ip_prefix 2001:7e8:2200::/48 "lulux01.sixxs.net ptlu"
	mod_ip_prefix 2001:7e8:2200::/40 "lulux01.sixxs.net ptlu"
	mod_ip_prefix 2001:808:100::/48 "plpoz01.sixxs.net poznan"
	mod_ip_prefix 2001:808:100::/40 "plpoz01.sixxs.net poznan"
	mod_ip_prefix 2001:808:e100::/48 "plpoz01.sixxs.net poznan"
	mod_ip_prefix 2001:808:e100::/40 "plpoz01.sixxs.net poznan"
	mod_ip_prefix 2001:838:300::/48 "nlams01.sixxs.net concepts"
	mod_ip_prefix 2001:838:300::/40 "nlams01.sixxs.net concepts"
	mod_ip_prefix 2001:960:2::/48 "nlams04.sixxs.net scarlet"
	mod_ip_prefix 2001:960:600::/40 "nlams04.sixxs.net scarlet"
	mod_ip_prefix 2001:960:700::/40 "nlams04.sixxs.net scarlet"
	mod_ip_prefix 2001:a60:f000::/48 "demuc02.sixxs.net mnet"
	mod_ip_prefix 2001:a60:f000::/40 "demuc02.sixxs.net mnet"
	mod_ip_prefix 2001:ad0:900::/48 "eetll01.sixxs.net linxtelecom"
	mod_ip_prefix 2001:ad0:900::/40 "eetll01.sixxs.net linxtelecom"
	mod_ip_prefix 2001:b18:2000::/48 "ptlis01.sixxs.net nfsi"
	mod_ip_prefix 2001:b18:4000::/40 "ptlis01.sixxs.net nfsi"
	mod_ip_prefix 2604:8800:100::/48 "uschi03.sixxs.net cymru"
	mod_ip_prefix 2604:8800:100::/40 "uschi03.sixxs.net cymru"
	mod_ip_prefix 2610:0100:4fff::/48 "usanc01.sixxs.net gci"
	mod_ip_prefix 2610:0100:6000::/40 "usanc01.sixxs.net gci"
	mod_ip_prefix 2a00:14f0:e000::/48 "gblon03.sixxs.net gyron"
	mod_ip_prefix 2a00:14f0:e000::/40 "gblon03.sixxs.net gyron"
	mod_ip_prefix 2a00:15b8:100::/48 "iedub02.sixxs.net digiweb"
	mod_ip_prefix 2a00:15b8:100::/40 "iedub02.sixxs.net digiweb"
	mod_ip_prefix 2a01:198:200::/48 "dedus01.sixxs.net speedpartner"
	mod_ip_prefix 2a01:198:200::/40 "dedus01.sixxs.net speedpartner"
	mod_ip_prefix 2a01:198:300::/40 "dedus01.sixxs.net speedpartner"
	mod_ip_prefix 2a01:198:400::/40 "dedus01.sixxs.net speedpartner"
	mod_ip_prefix 2a01:198:500::/40 "dedus01.sixxs.net speedpartner"
	mod_ip_prefix 2a01:198:600::/40 "dedus01.sixxs.net speedpartner"
	mod_ip_prefix 2a01:198:700::/40 "dedus01.sixxs.net speedpartner"
	mod_ip_prefix 2a01:240:fe00::/48 "frmrs01.sixxs.net jaguar"
	mod_ip_prefix 2a01:240:fe00::/40 "frmrs01.sixxs.net jaguar"
	mod_ip_prefix 2a01:348:100::/40 "gblon02.sixxs.net goscomb"
	mod_ip_prefix 2a01:348:200::/40 "gblon02.sixxs.net goscomb"
	mod_ip_prefix 2a01:348:6::/48 "gblon02.sixxs.net goscomb"
	mod_ip_prefix 2a01:8c00:ff00::/48 "czprg01.sixxs.net ignum"
	mod_ip_prefix 2a01:8c00:ff00::/40 "czprg01.sixxs.net ignum"
	mod_ip_prefix 2a02:2528:ff00::/48 "chgva01.sixxs.net ipmax"
	mod_ip_prefix 2a02:2528:ff00::/40 "chgva01.sixxs.net ipmax"
	mod_ip_prefix 2a02:278:1200::/48 "iegwy01.sixxs.net airwire"
	mod_ip_prefix 2a02:278:1200::/40 "iegwy01.sixxs.net airwire"
	mod_ip_prefix 2a02:980:1000::/48 "dkcph02.sixxs.net fullrate"
	mod_ip_prefix 2a02:980:1000::/40 "dkcph02.sixxs.net fullrate"
  </locationMatch>
 
# Tell browsers that once /images/ [anything] is fetched, cache it forever.
# Don't even try and *ask* again.  These images do not change.  This will
# permit followup tests by the user both run faster, and lower the load on 
# the web server.
<Location /images>
 FileETag none
 ExpiresActive on
 ExpiresDefault "access plus 10 years"
</location>
 
<Directory /home/test-ipv6.websters-computers.com/cgi-bin>
allow from all
</Directory>
RemoveHandler .php
RemoveHandler .php5
IPCCommTimeout 121
<Files awstats.pl>
AuthName "test-ipv6.websters-computers.com statistics"
AuthType Basic
AuthUserFile /home/test-ipv6.websters-computers.com/.awstats-htpasswd
require valid-user
</Files>
DefaultLanguage en-us
AddDefaultCharset UTF-8
LanguagePriority
</VirtualHost>


Once done save and restart apache.
you can test the virtual host by trying to bring up "http://test-ipv6.websters-computers.com/ip/" (change to your domain name) You should see something like this:

callback({"ip":"94.76.234.236","type":"ipv4","subtype":"","via":""})

Now we need to copy some files to our web server folder, mine is located at "/home/test-ipv6.websters-computers.com/public_html"

mkdir /home/test-ipv6.websters-computers.com/public_html/charts
mkdir /home/test-ipv6.websters-computers.com/public_html/charts/daily_db
mkdir /home/test-ipv6.websters-computers.com/public_html/charts/daily_images
mkdir /home/test-ipv6.websters-computers.com/public_html/images
cp /home/test-ipv6.websters-computers.com/falling-sky-read-only/source/chart/* /home/test-ipv6.websters-computers.com/public_html/charts/
cp /home/test-ipv6.websters-computers.com/falling-sky-read-only/images/* /home/test-ipv6.websters-computers.com/public_html/images/

Now we need to create a folder to temporarily store the files once built before i move them to the web server and we need to create our config file.
mkdir /home/test-ipv6.websters-computers.com/built
cd /home/test-ipv6.websters-computers.com/falling-sky-read-only/source
cp config.inc config.inc.local

Now edit config.inc.local. Here's what mine looks like. Change to your setup.

#! /bin/echo used by build.pl
# NOTE
# You can create "config.inc.local" to override anything you see here.
# For mirror sites, this might make tracking test-ipv6.com's code easier.
 
use strict;
 
$COMPRESS{"js"} =  "java -jar /usr/local/share/yuicompressor/yuicompressor.jar --type js --charset utf-8 -o [OUTPUT] [INPUT]";
$COMPRESS{"css"} = "java -jar /usr/local/share/yuicompressor/yuicompressor.jar --type css --charset utf-8  -o [OUTPUT] [INPUT]";
$COMPRESS{"html"} = "tidy -quiet -indent -asxhtml -utf8 -w 120 < [INPUT] > [OUTPUT]";
 
$INSTALL = "/home/test-ipv6.websters-computers.com/built"; 
 
# TEMPLATE VARIABLES
$VARS->{"domain"} = "test-ipv6.websters-computers.com";
$VARS->{"ipv4"} = "94.76.234.237";
$VARS->{"ipv6"} = "2001:470:1f09:15a4::100b";
$VARS->{"contact"} = 'Jason Fesler';
$VARS->{"mailto"} = 'jfesler@test-ipv6.com';
 
# Survey. if enabled, posts user results to survey.php for analysis.
# This is not critical to the user experienc.
$VARS->{use_survey} = 1;
 
# Replace IPv4, IPv6, and Cookies in the database with hashes.
# Caution: This will create a situation where post-analysis is
# greatly hampered, if you needed to to know what network
# the user was using.  This can affect re-scoring existing 
# database entries.
$VARS->{hash_survey} = 0;  
 
# If enabled, show the "stats" tab. 
# You are responsible for the stats page being generated based
# on your local stats.
$VARS->{use_stats} = 1;  # If enabled, shows the "stats" tab.  
 
# Like locales, allows selectively including different versions.
# You can have more than one value in this array.
# First match wins.
$VARS->{site_locals} = ["site"]; #In addition to .en-us, look for .en-us.site, .site 
 
# Look for buggy dns.
# http://code.google.com/p/falling-sky/issues/detail?id=21
# http://getipv6.info/index.php/Customer_problems_that_could_occur#D-Link
# Requires a DNS entry like this:
# buggydns1 AAAA  d8da.e472::0
# That's the IPv4 address converted to hex; in my case, 216.218.228.114
# Do not use this feature if your server IPv4 is between 32.0.0.0 to 64.255.255.255.
$VARS->{buggydns1_check} = 1;
 
# Look for proxy Via headers.
$VARS->{proxy_check} = 1;
 
#  # Stop running yuicompressor, harder to debug
#  # Warning: Much larger bandwidth requirements.
#  $COMPRESS{"js"} = "cat < [INPUT] > [OUTPUT]"; 
#  $COMPRESS{"css"} = "cat < [INPUT] > [OUTPUT]";
 
1;

now as i want the stats to work i need to create a mysql database (if you don't want the stats set "$VARS->{use_survey}" to 0 and skip this bit.)
I have phpmyadmin setup so i just import "/home/test-ipv6.websters-computers.com/falling-sky-read-only/source/php/create.sql" to my database.
next create th files to connect to the database.

touch /home/test-ipv6.websters-computers.com/db.php
touch /home/test-ipv6.websters-computers.com/db.pl


now edit them and change to your settings. here's mine db.php

<?php
 
global $dbhandle;
 
 
  $DB="test_ipv6_websters_computers_com";
  $USERNAME="user";
  $PASSWORD="password";
 
  // Connecting, selecting database
  $dbhandle = mysql_connect("localhost",$USERNAME,$PASSWORD) 
      or die('Could not connect: ' . mysql_error());
  mysql_select_db($DB,$dbhandle) or die('Could not select database');
?>


and db.pl

#! /usr/local/bin/perl5
 
use DBI;
our $dsn = "DBI:mysql:database=test_ipv6_websters_computers_com;host=localhost";              
our $user = "user";
our $password = "password";
our $dbh = DBI->connect($dsn, $user, $password);
die "Failed to connect to mysql" unless ($dbh);

now edit "/home/test-ipv6.websters-computers.com/public_html/charts/chart-daily" and change line 34 to (change for your setup)

require "/home/test-ipv6.websters-computers.com/db.pl";

now edit "/home/test-ipv6.websters-computers.com/public_html/charts/generate-rrd-db" and change line 31 to (change for your setup)

require "/home/test-ipv6.websters-computers.com/db.pl";

now edit "/home/test-ipv6.websters-computers.com/public_html/charts/generate-rrd-images" and change line 34 to (change for your setup)

require "/home/test-ipv6.websters-computers.com/db.pl";


also i had to change line 119 to (changed due to centos running an older version of rrdtools).

    my ($ref) = RRDs::graph( "$IMGDIR/$name", @args );

now edit "/home/test-ipv6.websters-computers.com/public_html/charts/prep-daily" and change line 38 to (change for your setup)

require "/home/test-ipv6.websters-computers.com/db.pl";

now edit "/home/test-ipv6.websters-computers.com/public_html/charts/runme-frequently" and change line 6 to (change for your setup)

 cd /home/test-ipv6.websters-computers.com/public_html/charts


and line 10 and 11

    rsync -a daily_images/  /home/test-ipv6.websters-computers.com/public_html/charts  &&
    rsync -a daily_images/  /home/test-ipv6.websters-computers.com/public_html/charts

setup a cron job to run "/home/test-ipv6.websters-computers.com/public_html/charts/runme-frequently" i have it running every 5 minutes but hourly is probably fine as well.

If you want to put your company logo on the site you need to edit "/home/test-ipv6.websters-computers.com/falling-sky-read-only/source/html/footer.inc" mine now looks like this

<hr/>
<div id="about">
<p><img src="/images/websters-computers-logo2.png" alt="websters computers logo" width="728" height="105" /><br />
This mirror is provided by <a target="_blank" href="http://www.websters-computers.com">Websters Computers</a></p>
<p>  Copyright (C) 2010, 2011 Jason Fesler. All rights reserved. -- r[% GET svn_Revision %]<br/>
 <a href="mirrors.html">Mirrors</a> |  <a href="partnering.html">Partnering</a> | <a href="mission.html">Mission</a> | <a href="source.html">Source</a> | <a href="mailto:jfesler@test-ipv6.com?subject=test-ipv6.com">Email</a>
 - &nbsp; - 
<a href="attributions.html">Attributions</a>
[% IF page == "index" %]  |  <a href="#" onclick="GIGO.showdebug()">Debug</a> [% END %]
<br/>
[% PROCESS "disclaimer.inc" %]
</p>
</div>
</body>
</html>

Now we can finally build the files.

cd /home/test-ipv6.websters-computers.com/falling-sky-read-only/source
./build.pl


They should now be stored in "cd /home/test-ipv6.websters-computers.com/built"
so we can can now copy them to the web server.

cd /home/test-ipv6.websters-computers.com/built
cp -v *.* /home/test-ipv6.websters-computers.com/public_html

Now go and test your site, everything should be working.
If you get any errors or want to have you mirror added as a public mirror post on the Mailling list

You will need to keep updating the site as there is loads of changes happening.
To make this easier for myself i created a cron job to do this for me, its runs once a day (just after midnight) and emails me the results.

touch /home/test-ipv6.websters-computers.com/build.sh
chmod +x /home/test-ipv6.websters-computers.com/build.sh


Now edit "/home/test-ipv6.websters-computers.com/build.sh" and make it look like this.

cd /home/test-ipv6.websters-computers.com/built
rm *.*
cd /home/test-ipv6.websters-computers.com
svn checkout http://falling-sky.googlecode.com/svn/trunk/ falling-sky-read-only
cd /home/test-ipv6.websters-computers.com/falling-sky-read-only/source
./build.pl
cd /home/test-ipv6.websters-computers.com/built
cp -v *.* /home/test-ipv6.websters-computers.com/public_html


The first 2 lines clean out our build folder, the next 2 lines update the source files with any changes. The next 2 lines rebuild the files and the last 2 lines moves them to our web server.

finally create a cron job to run "/home/test-ipv6.websters-computers.com/build.sh" and tell it to email the results (only need to run once a day).

That's it, don't forget to check its all still working regularly.