Web Server Fixed

Dave Bucklin dave.bucklin at gmail.com
Thu Nov 8 09:59:47 UTC 2018

I noticed the following in /var/log/messages

   Nov  7 20:46:36 hh httpd[44051]: /etc/httpd.conf:9: server "frostbyte.cc" defined twice
   Nov  7 20:47:28 hh httpd[25088]: /etc/httpd.conf:9: server "frostbyte.cc" defined twice

Looking at /etc/httpd.conf, I noticed that there were two listen

   # $OpenBSD: httpd.conf,v 1.18 2018/03/23 11:36:41 florian Exp $
   server "frostbyte.cc" {
     listen on * port 80
     listen on :: port 80
     location "*" {
       root "/frostbyte"

I commented out the second one and it starts up, now.

   root at hh:/var/log#rcctl start httpd

The man page for httpd.conf says that the listen directive can be
specified multiple times.

> listen on address [tls] port number
>     Set the listen address and port.  This statement can be specified
>     multiple times.

That same man page on address values:

> Within the sections, a host address can be specified by IPv4 address,
> IPv6 address, interface name, interface group, or DNS hostname.  If the
> address is an interface name, httpd(8) will look up the first IPv4
> address and any other IPv4 and IPv6 addresses of the specified network
> interface.  If `*' is given as an address, httpd(8) will listen on all
> IPv4 and IPv6 addresses. means to listen on all IPv4 addresses
> and :: all IPv6 addresses.  A port can be specified by number or name.
> The port name to number mappings are found in the file /etc/services;
> see services(5) for details.

My guess is that an address of '*' already includes the ipv6 wildcard
'::', and httpd didn't like having both of them in there..

More information about the Friends mailing list