I
just finished setting up ipv6. After quite a bit of searching around, I hope I got it right! Documentation for doing most stuff with ipv6 sucks, so it's hard to tell if what I'm doing is correct (and if so, am I doing it optimally?).
Code:
<VirtualHost 173.255.198.65:80 [2600:3c00::f03c:91ff:fe93:824a]:80>
ServerAdmin a@abc.com
ServerName fangsoft.net
ServerAlias www.fangsoft.net
DocumentRoot /srv/www/fangsoft.net/public_html/
ErrorLog /srv/www/fangsoft.net/logs/error.log
CustomLog /srv/www/fangsoft.net/logs/access.log combined
</VirtualHost>
#gotta split up fangsoft.net and www.fangsoft.net because a wildcard in the CN field of a cert doesn't apply to the root domain
#CN=*.fangsoft.net works for www.fangsoft.net and proxy.fangsoft.net but not fangsoft.net
<VirtualHost 173.255.198.65:443 [2600:3c00::f03c:91ff:fe93:824a]:443>
ServerAdmin a@abc.com
ServerName fangsoft.net
DocumentRoot /srv/www/fangsoft.net/public_html/
ErrorLog /srv/www/fangsoft.net/logs/error.log
CustomLog /srv/www/fangsoft.net/logs/access.log combined
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/fangsoft.net.pem
SSLCertificateKeyFile /etc/apache2/ssl/fangsoft.net.key
</VirtualHost>
<VirtualHost 173.255.198.65:443 [2600:3c00::f03c:91ff:fe93:824a]:443>
ServerAdmin a@abc.com
ServerName www.fangsoft.net
DocumentRoot /srv/www/fangsoft.net/public_html/
ErrorLog /srv/www/fangsoft.net/logs/error.log
CustomLog /srv/www/fangsoft.net/logs/access.log combined
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/subdomain.fangsoft.net.pem
SSLCertificateKeyFile /etc/apache2/ssl/subdomain.fangsoft.net.key
</VirtualHost>
Also, you need to change your ports.conf so apache listens correctly:
Code:
NameVirtualHost 173.255.198.65:80
NameVirtualHost [2600:3c00::f03c:91ff:fe93:824a]:80
Listen 80
<IfModule mod_ssl.c>
# If you add NameVirtualHost *:443 here, you will also have to change
# the VirtualHost statement in /etc/apache2/sites-available/default-ssl
# to <VirtualHost *:443>
# Server Name Indication for SSL named virtual hosts is currently not
# supported by MSIE on Windows XP.
NameVirtualHost 173.255.198.65:443
NameVirtualHost [2600:3c00::f03c:91ff:fe93:824a]:443
Listen 443
</IfModule>
<IfModule mod_gnutls.c>
Listen 443
</IfModule>
And don't forget to add AAAA entries for every A entry in the DNS manager (I did this correctly, right?):
It's working (when I reload apache, it doesn't spit out any errors or warnings, and I can visit my site without any issues). My site (and all relevant subdomains) pass
this test. Unfortunately, I don't personally have ipv6, so I have no idea how to actually test if it works in practice.
To someone who actually has experience with this, is everything I've done correct?