0

I want to use caldav/carddav with Horde Framework and lighttpd. I can't connect to my Server with my iPhone or Thunderbird. I think the rewrite (lighttpd) isn't possible.

Used Versions: Debian 11 (bullseye) Lighttpd 1.4.59 Horde Framework 5.2.23

Lighttpd Config:

$HTTP["host"] == "dav.test.de" {
 url.rewrite-if-not-file = ("" => "/rpc.php")
}

curl query:

curl.exe -X PROPFIND --basic --user "username:password" dav.test.de

curl result:

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception\Forbidden</s:exception>
  <s:message>Requested uri (/) is out of base uri (/rpc.php/)</s:message>
  <s:sabredav-version>1.8.12</s:sabredav-version>
</d:error>

Is there any idea?

Thanks!

julian
  • 1
  • Generally, WebDAV is enabled for a url-path, e.g. `/dav/`. It looks like you configured SabreDAV to expect `/rpc.php/...` as the url-path. However, you have configured lighttpd to send requests, which might have url-path as short as `/` to be processed by rpc.php when the request is not to a file. (`/` is not a file if it does not exist or if it is a directory -- a directory is not a regular file). A quick workaround would be to redirect instead of rewrite. A redirect is sent back to the client, whereas a rewrite is internal to lighttpd. – gstrauss Nov 28 '22 at 01:15
  • A better solution is probably to configure SabreDAV to use `/` as the webdav root, rather than `/rpc.php/` as the webdav root, but only if your intention is that the entire site for that virtual host is intended to be WebDAV-enabled. – gstrauss Nov 28 '22 at 01:18

0 Answers0