Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →To set up WebDAV on Ubuntu, run Nginx with its ngx_http_dav_module, map a dedicated writable directory, enable the required DAV methods, protect the endpoint with authentication and HTTPS, then test the exact methods your client uses. Nginx handles PUT, DELETE, MKCOL, COPY, and MOVE; it does not provide the PROPFIND, LOCK, or UNLOCK behavior that many full WebDAV clients expect.
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
What Nginx WebDAV supports—and what it does not
Nginx’s built-in DAV module is intended for automated file management over WebDAV. Its supported operations are:
As an Amazon Associate I earn from qualifying purchases.
Free tools Windows power users keep installed
One-click scans. No signup required.
| Method | Typical purpose | Built-in Nginx DAV support |
|---|---|---|
PUT |
Upload or replace a file | Supported |
DELETE |
Remove a file or directory where permitted | Supported |
MKCOL |
Create a collection (directory) | Supported |
COPY |
Copy a resource to another path | Supported |
MOVE |
Move or rename a resource | Supported |
PROPFIND |
List collections and read WebDAV properties | Not provided by the built-in module |
LOCK and UNLOCK |
Coordinate concurrent editing | Not provided by the built-in module |
The module is not guaranteed to be compiled into every Nginx binary. A client that only uploads, creates directories, copies, moves, and deletes can work with the built-in module. A client that discovers folders with PROPFIND, checks capabilities with OPTIONS, or requires locking needs a DAV extension module or a separate WebDAV implementation.
Plan the deployment before changing Nginx
- Use a dedicated hostname such as
files.example.com, rather than exposing DAV from an unrelated public website. - Keep the storage directory outside the public site tree when practical.
- Decide which Linux account and group Nginx uses. Ubuntu installations commonly use
www-data, but verify theusersetting in your Nginx configuration. - Choose the client methods you actually need. Do not add unsupported methods to
dav_methodsand assume they will work. - Use HTTPS before allowing passwords or file content to cross the network.
The examples below use /srv/webdav as the storage root and /dav/ as the URL prefix. With a root directive in that location, a request for /dav/report.pdf maps to /srv/webdav/dav/report.pdf. Create the matching directory structure, or change the paths consistently.
#1 Best Overall
Install Nginx and confirm the DAV module
Install Nginx from Ubuntu packages or the official Nginx repository, then inspect the resulting binary:
sudo apt update
sudo apt install nginx
nginx -V 2>&1
In the build options, look for --with-http_dav_module. If it is absent, the running binary cannot process the DAV methods described here. Install a package or repository build that includes the module, or use a separately maintained WebDAV implementation. Confirm the binary again after changing packages so that you are testing the executable actually used by the service.
Ubuntu’s normal configuration directory is /etc/nginx/, and its standard logs are under /var/log/nginx/. Keep this setup in a dedicated site file rather than editing the distribution’s main file unnecessarily.
Create a storage directory with least-privilege permissions
Create both the mapped directory and Nginx’s temporary request-body directory. The temporary path must be writable because uploaded request bodies may be spooled there before Nginx writes them to the destination.
sudo mkdir -p /srv/webdav/dav
sudo mkdir -p /var/lib/nginx/body
sudo chown -R www-data:www-data /srv/webdav /var/lib/nginx/body
sudo chmod 750 /srv/webdav
sudo chmod 750 /srv/webdav/dav
sudo chmod 750 /var/lib/nginx/body
Replace www-data with the account and group shown by your Nginx configuration. If several trusted processes must access the files, use a dedicated group and grant only the group permissions required. Do not make the tree world-writable: WebDAV methods can create, replace, move, and delete data.
Rank #2
Write the initial WebDAV server block
Create a site file such as /etc/nginx/sites-available/webdav. The following block shows the DAV directives and a temporary TLS configuration. Replace the hostname and certificate paths with the values for your server.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11server {
listen 443 ssl;
server_name files.example.com;
ssl_certificate /etc/letsencrypt/live/files.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/files.example.com/privkey.pem;
auth_basic WebDAV;
auth_basic_user_file /etc/nginx/.htpasswd;
location /dav/ {
root /srv/webdav;
client_body_temp_path /var/lib/nginx/body;
dav_methods PUT DELETE MKCOL COPY MOVE;
create_full_put_path on;
dav_access user:rw group:rw all:r;
}
}
Each directive has a distinct job:
rootmaps the URL to the filesystem. In this example,/dav/remains part of the path below/srv/webdav.client_body_temp_pathidentifies writable temporary storage for request bodies.dav_methodsenables the five operations implemented by Nginx’s built-in DAV module.create_full_put_path onpermits Nginx to create missing intermediate directories for aPUTrequest. Leave it off if clients must create directories explicitly withMKCOL.dav_accesscontrols permissions on newly created files and directories. The example grants read/write to the owner and group and read access to everyone else; tighten theallsetting when anonymous filesystem reads are inappropriate.
If you want the URL prefix excluded from the filesystem path, redesign the mapping rather than silently assuming that root behaves like an alias. Test one known filename and verify its actual location before uploading valuable data.
Add authentication and restrict who can modify files
Basic Authentication is supported by Nginx, but credentials are only protected from interception when the connection uses HTTPS. Create an htpasswd file with the system utility available on your Ubuntu installation, then reference it with auth_basic_user_file:
sudo htpasswd -c /etc/nginx/.htpasswd alice
Use -c only when creating the file. Omitting it for later users prevents overwriting the existing accounts. Keep the file readable by Nginx but not publicly served.
You can also restrict write-capable methods to an administration network while leaving read requests available to a broader set of addresses. Place this inside the DAV location:
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesRank #3
limit_except GET {
allow 192.0.2.0/24;
deny all;
}
Replace the example network with the real trusted range. This pattern denies non-GET requests outside that range; authentication still applies according to the surrounding server and location configuration. If every operation should be private, require authentication for the whole location and use network rules as a second control.
Enable the site and check the configuration
On Ubuntu’s standard layout, enable the site with a symbolic link and remove or avoid conflicting server blocks for the same hostname:
sudo ln -s /etc/nginx/sites-available/webdav /etc/nginx/sites-enabled/webdav
sudo nginx -t
sudo systemctl reload nginx
nginx -t must report a successful syntax check before a reload. If it fails, correct the first reported error, run the test again, and only then reload. A reload applies the new configuration without stopping existing workers.
When a request fails, inspect the error log while reproducing it:
sudo tail -f /var/log/nginx/error.log
Permission errors, missing temporary directories, and incorrect path mappings usually appear there more clearly than in a graphical WebDAV client.
Rank #4
Put the endpoint behind HTTPS
Production WebDAV should use TLS. Add a separate port-80 server block that redirects ordinary traffic to the HTTPS hostname:
server {
listen 80;
server_name files.example.com;
return 301 https://$host$request_uri;
}
Obtain a certificate from a trusted certificate authority. For a Let’s Encrypt HTTP-01 challenge, port 80 must be reachable from the public internet while the certificate is issued. Certbot’s Nginx plugin can install the certificate directives in the matching server block and reload Nginx. Keep port 80 reachable for the validation workflow even if normal users are redirected immediately to HTTPS.
After certificate installation, verify that the certificate hostname matches the DAV hostname and that clients connect to the HTTPS URL. Never send the Basic Authentication password to an unencrypted HTTP endpoint.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Test each required WebDAV operation
Test from a machine that can reach the hostname. The examples use curl; substitute a real password and a file that is safe to upload.
Upload a file with PUT
curl -u alice -T sample.txt -X PUT https://files.example.com/dav/sample.txt
A successful upload should create or replace the mapped file. If the response is an authorization error, check both the htpasswd credentials and the limit_except network rule.
Create a collection with MKCOL
curl -u alice -X MKCOL https://files.example.com/dav/projects
If the parent path does not exist, create it first or enable create_full_put_path for uploads that create intermediate paths.
Copy and move resources
curl -u alice -X COPY
-H 'Destination: https://files.example.com/dav/archive/sample.txt'
https://files.example.com/dav/sample.txt
curl -u alice -X MOVE
-H 'Destination: https://files.example.com/dav/archive/sample.txt'
https://files.example.com/dav/sample.txt
The destination must be a valid URL understood by the client and server. URL-encode spaces and other special characters.
Recommended Free Tools
Delete a resource
curl -u alice -X DELETE https://files.example.com/dav/archive/sample.txt
Deletion is irreversible unless you have a separate backup or snapshot system. Restrict this method more tightly than ordinary reads when possible.
Check unsupported discovery and locking methods
curl -u alice -X PROPFIND https://files.example.com/dav/
curl -u alice -X LOCK https://files.example.com/dav/sample.txt
curl -u alice -X UNLOCK https://files.example.com/dav/sample.txt
Do not treat a failure here as proof that the upload configuration is broken. The built-in module does not implement these methods. A client that requires them may stop during connection setup even though PUT and DELETE work correctly.
Diagnose common failures
| Symptom | Likely cause | What to check |
|---|---|---|
nginx -t reports an unknown DAV directive |
The binary was built without the DAV module. | Run nginx -V and look for --with-http_dav_module; install a build that contains it. |
| Uploads return 403 or 500 | The storage or temporary directory is not writable by the Nginx worker. | Confirm ownership, mode bits, the configured user, and the client_body_temp_path directory. |
| Files appear in an unexpected directory | The URI prefix is being appended by root. |
Map one test URL manually and create the corresponding directory, or revise the location mapping deliberately. |
| Directory creation fails | MKCOL is not allowed by the location or the parent directory is missing. |
Check dav_methods, parent permissions, and whether create_full_put_path matches your workflow. |
| Writes are denied only from some networks | The limit_except allow/deny list is working as configured. |
Verify the source address seen by Nginx and update the trusted CIDR range. |
| A client reports that WebDAV is unavailable during login | It requires PROPFIND, OPTIONS, LOCK, or UNLOCK. |
Inspect the client’s method requirements and use a DAV extension or a complete WebDAV server if those methods are mandatory. |
| Certificate issuance cannot complete | The HTTP-01 challenge cannot reach port 80. | Open port 80 to the internet during issuance, confirm DNS points to the server, and let the certificate tool update the correct server block. |
Choose the right implementation for your client
| Requirement | Built-in Nginx DAV | DAV extension module | Dedicated WebDAV server |
|---|---|---|---|
| Core file operations | Lightweight and suitable for PUT, DELETE, MKCOL, COPY, and MOVE. |
Depends on the extension’s build and maintenance. | Usually provided as part of a fuller protocol implementation. |
| Property queries and directory discovery | Not available through the built-in module. | Possible when the extension implements the required methods. | Generally the better fit when these are central requirements. |
| Locking | No built-in LOCK/UNLOCK support. |
Possible only if the chosen module supplies it. | Preferable for clients that rely on locking semantics. |
| Authentication and TLS | Use Nginx authentication controls and HTTPS. | Still depends on the surrounding Nginx configuration. | Evaluate the server’s own authentication and TLS integration. |
| Filesystem permissions | Controlled by the Linux account, directory modes, and dav_access. |
Verify behavior after installation and upgrades. | Check how the service account maps to the storage tree. |
| Maintenance | Simple when your Ubuntu Nginx package includes the module. | Requires tracking compatibility with the Nginx build. | Adds another service and its update, logging, and security responsibilities. |
Use the built-in module when its five methods match the application and you value a small configuration footprint. Select an extension or a dedicated implementation when the client cannot operate without property queries, locking, or other methods outside that set.
Operational security checklist
- Serve the DAV endpoint over HTTPS and redirect plain HTTP.
- Require authentication before accepting uploads, moves, or deletes.
- Limit write-capable methods by source network when feasible.
- Store data outside the public website tree and grant Nginx only the access it needs.
- Keep the temporary request-body directory private and writable only by the service account or its group.
- Review Nginx access and error logs for unexpected methods, repeated authentication failures, and path errors.
- Back up the storage tree separately; successful
DELETEandMOVEoperations do not provide recovery. - Retest the exact client methods after Nginx or module upgrades.
Final decision
A secure, usable Nginx WebDAV endpoint on Ubuntu is a combination of five things: a binary containing ngx_http_dav_module, a correctly writable filesystem mapping, explicit DAV method directives, HTTPS with authentication, and a client whose protocol expectations match Nginx’s partial implementation. Validate each layer independently. If the client requires PROPFIND or locking, change the implementation rather than trying to force unsupported methods into the Nginx configuration.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




