How to enable IPv6 on Apache2
Below are snippets for the settings you can use to enable IPv6 on Apache2. These settings can be changed/added from /etc/apache2/ports.conf
You can use multiple Listen directives to listen on multiple IP’s. This goes for both IPv4 and IPv6.
Listen * (Both IPv4 and IPv6 on every IP)
Listen 192.168.0.100 (IPv4 Only)
Listen Listen [2001:db8::a00:20ff:fea7:ccea]:80 (IPv6 Only)
You can also specify the port apache uses with the Listen directive. To listen op port 443 on both IPv4 and IPv6 use the following:
Listen 443 (Both IPv4 and IPv6 on every IP on port 443)
These vhosts go in /etc/apache2/sites-enabled/nameofyourvhost.conf
Set a vhost on all IP’s (both IPv4 and IPv6).
<virtualhost *:80>
ServerName fix6.net
ServerAlias *.fix6.net
DocumentRoot /www/fix6.net/public_html
ErrorLog /www/fix6.net/logs/error_log
Customlog /www/fix6.net/logs/combined_log combined
</virtualhost>
Set vhost to a specific IPv6 only
<virtualhost [2001:db8::a00:20ff:fea7:ccea]:80>
ServerName fix6.net
ServerAlias *.fix6.net
DocumentRoot /www/fix6.net/public_html
ErrorLog /www/fix6.net/logs/error_log
Customlog /www/fix6.net/logs/combined_log combined
</virtualhost>
Set vhost to a specific IPv4 and IPv6 adres
<virtualhost 192.168.1.100:80, [2001:db8::a00:20ff:fea7:ccea]:80>
ServerName fix6.net
ServerAlias *.fix6.net
DocumentRoot /www/fix6.net/public_html
ErrorLog /www/fix6.net/logs/error_log
Customlog /www/fix6.net/logs/combined_log combined
</virtualhost>
Source and more information: http://httpd.apache.org/docs/2.2/mod/mpm_common.html and http://httpd.apache.org/docs/2.2/vhosts/name-based.html
- IPv6 news and information