Utility

WebDAV Extension

The WebDAV methods nginx left out. PROPFIND, LOCK, UNLOCK: the ones clients actually need.

nginx-module-dav-ext

Install

Make sure you have the official nginx.org repository configured first. These packages require nginx from nginx.org, not the distro-bundled version.

Add the Blendbyte repository if you haven't already:

Add Blendbyte repository
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:

Install nginx-module-dav-ext
$ sudo apt install nginx-module-dav-ext

Most modules auto-enable on install. If yours didn't, enable it manually:

Enable module manually (if needed)
$ 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 with a WebDAV module that handles PUT, DELETE, MKCOL, COPY, and MOVE. What it doesn't implement is PROPFIND, LOCK, UNLOCK, and PROPPATCH. Those are fundamental to the WebDAV specification and required by virtually every real WebDAV client. Without them, macOS Finder, Windows WebDAV, Cadaver, davfs2, and most WebDAV-speaking applications either refuse to connect or fail in confusing ways. This module adds those missing methods, turning nginx's partial WebDAV into a compliant implementation. Useful for self-hosted file sharing, CalDAV/CardDAV setups (paired with appropriate backend software), and any scenario that requires 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 configuration. Adjust to your setup.

nginx.conf example
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 module replaces libnginx-mod-http-dav-ext from the Sury nginx repository. The package declares Replaces and Conflicts so apt handles the swap automatically in one transaction.

Drop-in replacement
# 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

This module is packaged from the upstream open-source project. Bug reports about module behaviour (not packaging) should go upstream.

https://github.com/arut/nginx-dav-ext-module ↗

Related modules

← All modules