Anyway, I've found out that if sysctl net.inet6.ip6.v6only is set to 1, enabling IPv6 in lighttpd would cause it to listen to IPv6 only. To solve this, you need to use these settings:
server.use-ipv6 = "enable"If you need to use SSL, simply use:
$SERVER["socket"] == "0.0.0.0:80" {
}
server.use-ipv6 = "enable"Tada! It works:
ssl.engine = "enable"
ssl.pemfile = "/var/etc/cert.pem"
$SERVER["socket"] == "0.0.0.0:443" {
ssl.engine = "enable"
ssl.pemfile = "/var/etc/cert.pem"
}
root@soulfury:/# sockstat | grep lighttpd
root lighttpd 23974 4 tcp6 *:443 *:*
root lighttpd 23974 5 tcp4 *:443 *:*
root@soulfury:/# sysctl -a | grep v6only
net.inet6.ip6.v6only: 1
No comments:
Post a Comment