Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 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

        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


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

share|improve this question
up vote 1 down vote accepted

If you can ping it then there is nothing wrong in the hosts file and i would think its something to do with the Apache config.

  • Check your Document root is correct and all the files are in correct place.
  • This link here for apache shows that the IPV6 must be in square brackets.
  • Any firewalls/IPtables blocking IPV6 packets?


share|improve this answer
I changed Listen 80 to Listen *:80 it works now. That was very weird. I changed it back to Listen 80 it still works. I guess after Apache started, something must have been listening to the [::]:80 address. So Apache couldn't bind to it. – Dan Jun 6 '12 at 9:23
You just had to restart it as I think it picks up new /etc/hosts upon startup. – phoops Mar 10 '14 at 22:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .