| 12345678910111213141516171819202122232425262728 |
- $HTTP["remoteip"] !~ "WHITELIST" {
- # Require authentication
- $HTTP["host"] =~ "." {
- server.document-root = "/webdav"
- webdav.activate = "enable"
- webdav.is-readonly = "enable"
- auth.backend = "htpasswd"
- auth.backend.htpasswd.userfile = "/config/htpasswd"
- auth.require = ( "" => ( "method" => "basic",
- "realm" => "webdav",
- "require" => "valid-user" ) )
- }
- }
- else $HTTP["remoteip"] =~ "WHITELIST" {
- # Whitelisted IP, do not require user authentication
- $HTTP["host"] =~ "." {
- server.document-root = "/webdav"
- webdav.activate = "enable"
- webdav.is-readonly = "enable"
- }
- }
|