Server Fault is a question and answer site for system and network administrators. 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'm using apache2.2

How to listen both Ipv6 and Ipv4?


only Ipv6 / only Ipv4

share|improve this question

Apache supports multiple Listen options:


IPv6 addresses must be surrounded in square brackets, as in the following example:

Listen [2001:db8::a00:20ff:fea7:ccea]:80
share|improve this answer

What l1x said, plus, this is how you do both in a vhost:

<VirtualHost [2001:470:c083:1::1]:80>

Preferably with your IPs instead of mine :)

share|improve this answer
Yeah, rite, if he wants vhosts. – Istvan Nov 4 '09 at 23:15
I don't know when the last time I configured an apache instance that didn't have vhosts was, so I always assume it :) – Bill Weiss Nov 4 '09 at 23:21

When I tried to use two separate Listen directives on a dual-stack host Apache refused to start, with an error like something had already bound on port 80. Surely this is a bug, but I had success by using this:

Listen          "*:80"
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.