Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lighthttp listens on all IPv6 addresses #239

Open
Madic- opened this issue Mar 3, 2018 · 3 comments
Open

lighthttp listens on all IPv6 addresses #239

Madic- opened this issue Mar 3, 2018 · 3 comments
Labels

Comments

@Madic-
Copy link

Madic- commented Mar 3, 2018

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

@PromoFaux
Copy link
Member

Is this still an issue in the latest tag?

@shaderecker
Copy link
Contributor

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

@treitmayr
Copy link

treitmayr commented Feb 7, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants