0

I'm trying to setup webdav on lighttpd but I'm getting a lighttpd.conf: parser failed somewhere near here at end-of-file. The webdav config is at the end of the file: here it is-

$HTTP["host"] == "www.markmhart.com" {
  server.document-root = "/var/www/servers/www.markmhart.com/pages/" 
  $HTTP["url"] =~ "^/download/" {
    dir-listing.activate = "enable" 
  }
alias.url = ("/media" => "/media/mark/media")
    $HTTP["url"] =~ "^/media($|/)" {
        webdav.activate = "enable"
        webdav.is-readonly = "disable"
        webdav.sqlite-db-name = "/var/run/lighttpd/lighttpd.webdav_lock.db"
        auth.backend = "htpasswd"
        auth.backend.htpasswd.userfile = "/var/www/servers/www.markmhart.com/passwd.dav"
        auth.require = ( "" => ( "method" => "basic",
            "realm" => "webdav",
            "require" => "valid-user" ))
 
}

Thanks in advance for your help.

1 Answer 1

0

When you indent your config file properly you'll notice that you are missing a closing curly brace:

$HTTP["host"] == "www.markmhart.com" {
  server.document-root = "/var/www/servers/www.markmhart.com/pages/" 
  $HTTP["url"] =~ "^/download/" {
    dir-listing.activate = "enable" 
  }
  alias.url = ("/media" => "/media/mark/media")
  $HTTP["url"] =~ "^/media($|/)" {
    webdav.activate = "enable"
    webdav.is-readonly = "disable"
    webdav.sqlite-db-name = "/var/run/lighttpd/lighttpd.webdav_lock.db"
    auth.backend = "htpasswd"
    auth.backend.htpasswd.userfile = "/var/www/servers/www.markmhart.com/passwd.dav"
    auth.require = ( "" => ( "method" => "basic",
        "realm" => "webdav",
        "require" => "valid-user" ))
  }

Just add it at the end:

}
3
  • OK that fixed the problem. However, when I do a cadaver I get a Cannot open collection - 404 not found. The path and files are good. They are chown to nobody:nogroup and are set to 755. First I changed the realm to media fromwebdav and tried with no luck, then I took out all the security stuff and tried with no luck. Any ideas? Jul 20, 2020 at 22:09
  • I'll go ahead and post this as a new question and see if I can get any answers. Jul 21, 2020 at 3:36
  • That's a separate question, so you did the right thing to post it separate. If this solved your problem please accept the answer by clicking on the checkmark on the left side of the answer, so your question is marked as "solved" in the system. Jul 21, 2020 at 6:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .