WebDAV Extension
nginx ships half of WebDAV. This adds the other half.
- Package
- nginx-module-dav-ext
- Section
- Utility
- Replaces
- libnginx-mod-http-dav-ext
- Distros
- Debian 12, 13 · Ubuntu 22.04, 24.04, 26.04
- Arch
- amd64, arm64
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;
}Install from scratch
You'll need nginx from nginx.org configured first. These packages won't load on the distro nginx. Then 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
sudo apt install nginx-module-dav-extMost 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 nginxReplacing a Sury package?
This replaces libnginx-mod-http-dav-ext from the old Sury nginx repository. The package declares Replaces and Conflicts, so once your apt sources point at nginx.org and Blendbyte, a regular apt upgrade swaps it in. No manual cleanup.
Switching sources also moves you from Sury's nginx binary to nginx.org's. The migration guide walks through it in one go.
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 at github.com/arut/nginx-dav-ext-module ↗