Setting up a webDAV server

Francis Daly francis at
Sun Jan 2 12:26:33 UTC 2022

On Sun, Jan 02, 2022 at 05:00:12AM -0500, BonVonKnobloch wrote:

Hi there,

> I also set 'open' permissions until the thing runs OK, then tighten them.
> Still getting '405' on PUT.

The dav module documentation and example config is at

Can you show the config that you use, plus the filesystem permissions,
plus the details of a sample request that works and a sample request
that fails?

The nginx error log (possibly at a more-detailed level than the default)
might also show why nginx is responding the way that it is.

Maybe having all of that information in one place will make it clear
why your system is not responding the way that you want it to.

For what it's worth: my suspicion is that the "location" blocks that you
have shown are not being used with the sample requests that you make; GET
works because you have another location (or the default) that is being
used to read from this part of the filesystem, and PUT fails with 405
because "dav_methods off;" is the effective configuration that applies.

If you change your most recent

    location calendar

to be

    location /calendar

then GET will possibly start to fail 404 until a PUT is done -- unless
you also adjust the "root" so that your url-names and filesystem-names
are compatible.

(Or maybe it will all Just Work -- it is not immediately
clear to me which file on your filesystem you want nginx-dav to
create-or-overwrite when you do "PUT /calendar/Geburtstage.ics" --
is it /usr/local/nginx/html/calendar/calendar/Geburtstage.ics, or
something else?)

Good luck with it,

Francis Daly        francis at

More information about the nginx mailing list