docker-pi-hole icon indicating copy to clipboard operation
docker-pi-hole copied to clipboard

lighthttp listens on all IPv6 addresses

Open Madic- opened this issue 6 years ago • 3 comments

Hello,

lighttpd seems to ignore the ServerIPv6 env variable. It's listening on all IPv6 addresses (:::80). Is there any way that it will listen only on the IPv6 address specified by the env variable ServerIPv6, like IPv4 does?

The file /etc/lighttpd/lighttpd.conf seems to be missing the $SERVER["socket"] config for ipv6.

Kind Regards, Madic

Madic- avatar Mar 03 '18 02:03 Madic-

Is this still an issue in the latest tag?

PromoFaux avatar Oct 08 '21 23:10 PromoFaux

Yes, but see #924 why this can also be useful :)

shaderecker avatar Dec 11 '21 16:12 shaderecker

As a workaround to this issue, I override the docker entrypoint in the following way, so that $ServerIPv6 is honored: /bin/bash -c 'sed -i "s/\[::\]/[$ServerIPv6]/" /usr/share/lighttpd/use-ipv6.pl ; /s6-init'

Just append the following line to your docker-compose.yml (and observe indentation!):

    entrypoint: ['/bin/bash', '-c', 'sed -i "s/\[::\]/[$$ServerIPv6]/" /usr/share/lighttpd/use-ipv6.pl ; /s6-init']

Verified to work with tags 2022.01.1 and 2022.08.2. Just in case someone is in need for a quick and simple solution that does not require applying a full-blown patch.

treitmayr avatar Feb 07 '22 19:02 treitmayr