IPv6 local address in hosts file

Posted by Dan on Super User See other posts from Super User or by Dan
Published on 2012-06-06T08:14:55Z Indexed on 2012/06/06 10:43 UTC
Read the original article Hit count: 501

Filed under:
|
|
|
|

I have set up a local domain on my Apache server.

Then I added the following line in my /etc/hosts file

::1                     exampledomain.local

After I trying to navigate to it, (I tried Firefox and Chromium) I got a server not found error.

Then I tried ping6 and it worked:

dan@danny:~$ ping6 exampledomain.local
PING exampledomain.local(exampledomain.local) 56 data bytes
64 bytes from exampledomain.local: icmp_seq=1 ttl=64 time=0.032 ms

If I replace ::1 with 127.0.0.1 in my hosts file, it works fine. I'm not sure if this is relevant but this is my Virtual Host configuration in Apache2:

<VirtualHost *:80>
        ServerAlias exampledomain.local
        DocumentRoot /home/dan/sites/exampledomain

        <Directory /home/dan/sites/exampledomain>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/exampledomain-error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel debug

        CustomLog ${APACHE_LOG_DIR}/exampledomain-access.log combined

</VirtualHost>

My question is: How can I make it work with the IPv6 address?

© Super User or respective owner

Related posts about linux

Related posts about ubuntu