$HTTP["remoteip"] != "192.168.1.0/24" {
$HTTP["url"] =~ "^/~" {
url.access-deny = ( "" )
dir-listing.activate = "disable"
}
}
This allows any host with an IP in the 192.168.1.1-254 range view any URL that begins with /~username. It denies everyone else with a 403 - Forbidden message. Note that for some reason, listing the conditions in the opposite order (url first, remoteip second) did not produce the correct results.
Finally, make sure that you have both the appropriate modules enabled:
server.modules += ( "mod_access", "mod_userdir" )
No comments:
Post a Comment