I've added a file /etc/lighttpd/conf-enabled/99-external.conf with the following content:
server.port := 12080
Expected Behaviour:
Pihole's lighttpd to start and bind on port 12080
Actual Behaviour:
lighttpd is throwing the following error:
network.c.369) can't bind to socket: [::]:80: Permission denied
Root cause:
The file lighttpd.conf is loading /usr/share/lighttpd/use-ipv6.pl before conf-enabled folder, thus using the default server.port
Solution:
Update lighttpd.conf from:
# default listening port for IPv6 falls back to the IPv4 port
include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
include_shell "/usr/share/lighttpd/create-mime.conf.pl"
include "/etc/lighttpd/conf-enabled/*.conf"
to:
include_shell "/usr/share/lighttpd/create-mime.conf.pl"
include "/etc/lighttpd/conf-enabled/*.conf"
# default listening port for IPv6 falls back to the IPv4 port
include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port