Subject: port-i386/36855: apache-2.2.4nb6 default configuration (httpd.conf) does not work because of double Listen-directive
To: None <port-i386-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: None <sECuRE+netbsd@twice-irc.de>
List: netbsd-bugs
Date: 08/28/2007 22:05:00
>Number:         36855
>Category:       port-i386
>Synopsis:       apache-2.2.4nb6 default configuration (httpd.conf) does not work because of double Listen-directive
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    port-i386-maintainer
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 28 22:05:00 +0000 2007
>Originator:     Michael
>Release:        4.0_BETA2
>Organization:
>Environment:
NetBSD netbsd.rag.lan 4.0_BETA2 NetBSD 4.0_BETA2 (GENERIC) #0: Fri Aug 24 17:54:17 PDT 2007  builds@wb42:/home/builds/ab/netbsd-4/i386/200708240002Z-obj/home/builds/ab/netbsd-4/src/sys/arch/i386/compile/GENERIC i386
>Description:
In the default configuration file (/usr/pkg/etc/httpd/httpd.conf) of apache-2.2.4nb6, there are two Listen-directives:
Listen 80
Listen 0.0.0.0:80

As you certainly know, Listen 80 has the same effect as Listen 0.0.0.0:80 and therefore, starting httpd fails with:
(48)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs

I'm not sure if the last message (Unable to open logs) is related to the first error, so maybe create another bugreport please.
>How-To-Repeat:
Install apache2 using pkg_add apache-2.2.4nb6 and try to start it using apachectl -k start, it will fail. Remove Listen 0.0.0.0:80 and it will succeed.
>Fix:
Remove Listen 0.0.0.0:80 from /usr/pkg/etc/httpd/httpd.conf