Allowing multiple IP ranges access to a virtual host in lighttpd with remoteip

Posted by weeheavy on Server Fault See other posts from Server Fault or by weeheavy
Published on 2010-05-03T07:14:57Z Indexed on 2010/05/03 7:19 UTC
Read the original article Hit count: 347

Filed under:
|
|
|

Hi,

Say I'd like to restrict access to a virtual host to multiple IP ranges. How to do that? The Perl regex syntax style doesn't work, and i don't want loose restrictions like 10.*

The code below works for a single range:

$HTTP["host"] == "adm.example.org" {
    $HTTP["remoteip"] != "10.0.0.0/28" {
            url.access-deny = ( "" )
        }
}

Thanks in advance.

© Server Fault or respective owner

Related posts about lighttpd

Related posts about access