freddiefujiwra Asked: 2009-11-05 14:30:03 +0800 CST2009-11-05 14:30:03 +0800 CST 2009-11-05 14:30:03 +0800 CST Listening for both IPv6 and IPv4 in apache 2.2 772 I'm using apache2.2 How to listen both Ipv6 and Ipv4? or only Ipv6 / only Ipv4 apache-2.2 3 Answers Voted Istvan 2009-11-05T14:32:31+08:002009-11-05T14:32:31+08:00 Apache supports multiple Listen options: Listen 192.170.2.1:80 Listen 192.170.2.5:8000 IPv6 addresses must be surrounded in square brackets, as in the following example: Listen [2001:db8::a00:20ff:fea7:ccea]:80 Bill Weiss 2009-11-05T14:52:19+08:002009-11-05T14:52:19+08:00 What l1x said, plus, this is how you do both in a vhost: <VirtualHost 74.208.184.120:80 [2001:470:c083:1::1]:80> Preferably with your IPs instead of mine :) JGurtz 2013-05-02T12:06:11+08:002013-05-02T12:06:11+08:00 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"
Apache supports multiple Listen options:
IPv6 addresses must be surrounded in square brackets, as in the following example:
What l1x said, plus, this is how you do both in a vhost:
Preferably with your IPs instead of mine :)
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: