I've got server with 1 ipv4 address and with a few ipv6 addresses. One domain is redirected to ipv4 A record I set up apache ports.conf like this:
Listen ip.v4.address:80
NameVirtualHost ip.v4.address:80
and virtualhost file:
<VirtualHost ip.v4.address:80>
DocumentRoot /var/www/first/
ServerName first.domain
ServerAlias www.first.domain
ErrorLog ...
CustomLog ...
</VirtualHost>
And everything works fine.
Now I want to create new virtualhost for second domain with second ip. I redirected second domain to ipv6 AAAA record, add to ports.conf:
Listen [ip.v6.address]:80
NameVirtualHost [ip.v6.address]:80
create new virtualhost file:
<VirtualHost [ip.v6.address]:80>
DocumentRoot /var/www/second/
ServerName second.domain
ServerAlias www.second.domain
ErrorLog ...
CustomLog ...
</VirtualHost>
and restart Apache.
There was no errors on server start but it doesn't work.
When I enter second domain in the browser the server is not found.
When I enter [ip.v6.address]
site shows up.
Any help?