WebDAV Extension
nginx ships half of WebDAV. This adds the other half.
nginx-module-dav-ext Install
You'll need nginx from nginx.org configured first. These packages won't load on the distro nginx.
Add the Blendbyte repository if you haven't already:
sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://apt.blendbyte.net/nginx/blendbyte-archive-keyring.gpg \
| sudo tee /etc/apt/keyrings/blendbyte.gpg >/dev/null
echo "deb [signed-by=/etc/apt/keyrings/blendbyte.gpg] https://apt.blendbyte.net/nginx $(lsb_release -cs) main" \
| sudo tee /etc/apt/sources.list.d/blendbyte.list
sudo apt update Then install this module:
$ sudo apt install nginx-module-dav-ext Most modules auto-enable on install. If yours didn't:
$ sudo ln -s /etc/nginx/modules-available/50-mod-dav-ext.conf \
/etc/nginx/modules-enabled/
$ sudo nginx -t && sudo systemctl reload nginx What it does
Nginx ships a WebDAV module that handles PUT, DELETE, MKCOL, COPY, and MOVE. What it doesn't do is PROPFIND, LOCK, UNLOCK, or PROPPATCH. Those are required by virtually every real WebDAV client. Without them, macOS Finder, Windows WebDAV, Cadaver, davfs2, and basically any WebDAV app either refuses to connect or breaks in confusing ways. This module adds the missing methods, making nginx's WebDAV actually compliant. Good for self-hosted file sharing, CalDAV/CardDAV setups with appropriate backend software, or anything that needs a real WebDAV endpoint.
When to use it
- Full WebDAV compatibility with macOS Finder, Windows, and Linux clients
- Integration with WebDAV-speaking desktop applications and file managers
- Self-hosted file sync using WebDAV-compatible client software
- Internal document management with standard WebDAV clients
Configuration
A starting point. Adjust to taste.
location /webdav/ {
root /var/www/webdav;
create_full_put_path on;
# nginx built-in: PUT DELETE MKCOL COPY MOVE
dav_methods PUT DELETE MKCOL COPY MOVE;
dav_access user:rw group:r all:r;
# dav-ext: PROPFIND LOCK UNLOCK PROPPATCH
dav_ext_methods PROPFIND OPTIONS LOCK UNLOCK PROPPATCH;
# Required for PROPFIND to work
autoindex on;
auth_basic "WebDAV";
auth_basic_user_file /etc/nginx/.htpasswd;
} Replacing a Sury package?
This replaces libnginx-mod-http-dav-ext from the old Sury nginx repository.
The package declares Replaces and Conflicts so apt handles
the swap in one transaction. No manual cleanup needed.
# If you were using Sury, this upgrades in place:
sudo apt install nginx-module-dav-ext See the full migration guide for the complete Sury-to-Blendbyte migration steps.
Upstream project
We package this from the upstream open-source project. If it's a bug in the module itself (not in our packaging), report it upstream.
https://github.com/arut/nginx-dav-ext-module ↗