FAQ

Page Discussion History

HttpDavModule

Revision as of 19:49, 2 May 2012 by Admin (Talk | contribs)

Contents

Synopsis

This module adds the HTTP and WebDAV methods PUT, DELETE, MKCOL, COPY and MOVE.

This module does not provide full WebDAV support (it is missing PROPFIND and OPTIONS methods). If you need full WebDAV support in Nginx, please see ngx-dav-ext-module on github.

This module is not compiled by default. It is necessary to enable it at compile-time via

./configure --with-http_dav_module

Example:

location / {
  root     /data/www;
  client_body_temp_path  /data/client_temp;
 
  dav_methods  PUT DELETE MKCOL COPY MOVE;
 
  create_full_put_path   on;
  dav_access             group:rw  all:r;
 
  limit_except  GET {
    allow  192.168.1.0/32;
    deny   all;
  }
}

Directives

dav_access

Syntax: dav_access users : permissions ...
Default: user:rw
Context: http
server
location
Reference:dav_access


This directive assigns access rights for file and directories, for example:

dav_access user:rw group:rw all:r;

If assigning any permissions for groups or all, then it's not necessary to indicate permissions for user:

dav_access group:rw all:r;

dav_methods

Syntax: dav_methods off | method ...
Default: off
Context: http
server
location
Reference:dav_methods


This directive enables specified HTTP and WebDAV methods. Setting it to off disables all methods, ignoring the remaining parameters.

For the PUT method the destination file must reside on the same partition as the directory where the temporary file is stored (given by directive client_body_temp_path in the location section).

When a file is created using the PUT method it is possible to assign the modification date by setting the Date header.

create_full_put_path

Syntax: create_full_put_path on | off
Default: off
Context: http
server
location
Reference:create_full_put_path


By default, the PUT method can only create files within existing directories. This directive permits creating all necessary intermediate directories.

min_delete_depth

Syntax: min_delete_depth number
Default: 0
Context: http
server
location
Reference:min_delete_depth


References

Original Documentation