78 lines
3.2 KiB
Markdown
78 lines
3.2 KiB
Markdown
# Why use this WebDAV Nginx server?
|
|
This server is a single Nginx module attempting to be a fully-fledged WebDAV server in C. It's a fork of existing projects aiming to fix issues they had and merge the codebases. Specifically the goals of this project are:
|
|
|
|
[x] extremely easy setup configuration
|
|
|
|
[x] don't ruin the filesystem, the server filesystem looks like just as it does as a WebDAV mount, copy your files in or out and you're good to go
|
|
|
|
[x] APIs lenient enough to work with all clients in contrast to the native Nginx webdav module
|
|
|
|
[ ] WebDAV PROPPATCH method
|
|
|
|
[ ] WebDAV SEARCH method through xapian(?)
|
|
|
|
[ ] etag checksums for more robust client syncing
|
|
|
|
[ ] optional thumbnailing though cron jobs
|
|
|
|
[ ] optional filesystem indexing for WebDAV SEARCH with cron jobs that uses noninvasive and compatible .index files
|
|
|
|
[ ] optional locking and unlocking in redis
|
|
|
|
[x] functional testing suite
|
|
|
|
# Was this written from zero?
|
|
The native nginx dav_module has been integrated with a few changes for client compatibility. This solves some very difficult problems with client compatibility:
|
|
|
|
- trailing slash issues for DELETE requests uris
|
|
|
|
- trailing slash issues for MOVE and COPY requests uris and destination headers
|
|
|
|
- trailing slash issues for MKCOL request uris
|
|
|
|
The community [nginx_dav_ext_module](https://github.com/MkfsSion/nginx-dav-ext-module) is integrated as well for proper full WebDAV support.
|
|
|
|
# Using
|
|
There are a few reasonable ways of setting it up.
|
|
1. Standalone mode with authentication
|
|
|
|
TODO webdav apis with an htpasswd file through nginx basic authentication
|
|
|
|
2. Managed mode with subrequest full cloud functionality
|
|
|
|
TODO webdav apis with database managed through django
|
|
|
|
# Directives
|
|
| dada | Specification |
|
|
| --- | ----------- |
|
|
| Syntax | webdav_methods [GET] [PUT] [MKCOL] [DELETE] [PROPFIND] [OPTIONS] [LOCK] [UNLOCK]|
|
|
| Context | http, server, location |
|
|
|
|
|
|
|
|
# Building
|
|
After cloning this repository in $gitdir clone the nginx source code in $gitdir/nginx
|
|
cd $gitdir/nginx
|
|
./configure --add-dynamic-module=../../nginx-sf-webdav-module/' --with-compat
|
|
make
|
|
then the module is in $gitdir/nginx/objs/ngx_http_webdav_module.so
|
|
to compile the module statically just replace --add-dynamic-module with --add-module
|
|
|
|
# Requirements
|
|
|
|
- nginx version >= 1.13.4
|
|
|
|
- libxml2 + libxslt
|
|
|
|
The libxslt library is technically redundant and is only required since this combination is supported by nginx for the xslt module. Using builtin nginx mechanisms for linking against third-party libraries brings certain compatibility benefits. However this redundancy can be easily eliminated in the config file.
|
|
|
|
# Locking
|
|
|
|
- Only the exclusive write locks are supported, which is the only type of locks described in the WebDAV specification.
|
|
|
|
- All currently held locks are kept in a list. Checking if an object is constrained by a lock requires O(n) operations. A huge number of simultaneously held locks may degrade performance. Thus it is not recommended to have a large lock timeout which would increase the number of locks.
|
|
|
|
|
|
# Testing
|
|
TODO
|