Bug 54878

Summary: Multiple Listen directives prevent server to start on some valid configurations
Product: Apache httpd-2 Reporter: Vincent Deffontaines <gryzor>
Component: CoreAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: RESOLVED FIXED    
Severity: normal CC: apache_bugzilla
Priority: P2    
Version: 2.4.4   
Target Milestone: ---   
Hardware: PC   
OS: Linux   

Description Vincent Deffontaines 2013-04-23 20:47:15 UTC
Listen 127.0.0.1:443
Listen [::]:443

These two config lines are valid, and should work together. Httpd is expected to bind on the sole IPv4 address I mentionned, and on [::].

They result with httpd refusing to start.

(98)Address already in use: make_sock: could not bind to address [::]:443


This bug can also be reproducted on 2.2.22. I tend to suspect it has been around since IPv6 was implemented into httpd at all.
Comment 1 Vincent Deffontaines 2013-04-23 20:50:34 UTC
Listen 0.0.0.0:443
Listen [::]:443

These do work and might constitue a workaround on some configurations.
Comment 2 Joe Orton 2020-06-23 08:47:38 UTC
This is the default behaviour when IPv4-mapped IPv6 addresses are enabled, since binding on port 443 on both addresses conflicts at kernel level if that is true.  With r1879106 it is now possible to change this behaviour.