Stack Exchange network consists of 177 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I'm using apache2.2
How to listen both Ipv6 and Ipv4?
only Ipv6 / only Ipv4
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:
<VirtualHost 22.214.171.124:80 [2001:470:c083:1::1]:80>
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:
Required, but never shown