I have setup a login for a domain with lighttpd 1.4.31, no problem.

Now, I would like to skip this login for a single IP address.

I have tried a few different configs I found in the documentation and online but somehow it is not working:

$HTTP["host"] =~ "(private.mypage.net)$" {
    #$HTTP["remoteip"] !~ "^(81\.209\.1\.1|87\.128\.1\.1)$" {
    #$HTTP["remoteip"] != "" {
    $HTTP["remoteip"] !~ "^(87\.128\.1\.)" {
        auth.require = (
            "/" =>
                "method"  => "basic",
                "realm"   => "Private",
                "require" => "valid-user"

I triple checked the IP but I always get the login.

Any idea what I am doing wrong?


Turns out first try was correct $HTTP["remoteip"] !~ "^(81\.209\.1\.1|87\.128\.1\.1)$" {.

Problem was a second auth.require for the same folder. Did not see that because it was defined in another domain and should not have been applied here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.