A few days ago I configured lighttpd to listen on my VPS IPv6 address as well. It runs on a Debian 7 Xen VPS (Linode) with a 3.15.4-x86_64-linode45 kernel. The version of lighttpd is 1.4.31-4+deb7u3.
My lighttpd.conf used this configuration to listen to IPv4:
server.bind = "10.0.0.1" server.port = 80 I added the following to enable IPv6 as per http://redmine.lighttpd.net/projects/lighttpd/wiki/IPv6-Config
$SERVER["socket"] == "[2001:DB8::1]:80" { } Now, when I restarted lighttpd, everything was alright - it ended up listening to both as planned.
The problem appeared after I had to reboot my VPS. Turns out at boot time, starting lighttpd fails with the following message to the console:
[....] Starting web server: lighttpd2014-10-20 21:00:19: (network.c.405) can't bind to port: 2001:DB8::1 80 Cannot assign requested address If I login and run service lighttpd start it starts without a problem, listening on both IPv4 and IPv6.
I thought that maybe it didn't have the IPv6 address at boot time, so I made it output ifconfig to a file before attempting to start (in the init script) and it has both IPs assigned to the interface.
Any ideas what might be the problem or how to troubleshoot this further?