webdav.conf 675 B

12345678910111213141516171819202122232425262728
  1. $HTTP["remoteip"] !~ "WHITELIST" {
  2. # Require authentication
  3. $HTTP["host"] =~ "." {
  4. server.document-root = "/webdav"
  5. webdav.activate = "enable"
  6. webdav.is-readonly = "enable"
  7. auth.backend = "htpasswd"
  8. auth.backend.htpasswd.userfile = "/config/htpasswd"
  9. auth.require = ( "" => ( "method" => "basic",
  10. "realm" => "webdav",
  11. "require" => "valid-user" ) )
  12. }
  13. }
  14. else $HTTP["remoteip"] =~ "WHITELIST" {
  15. # Whitelisted IP, do not require user authentication
  16. $HTTP["host"] =~ "." {
  17. server.document-root = "/webdav"
  18. webdav.activate = "enable"
  19. webdav.is-readonly = "enable"
  20. }
  21. }