Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
nginx
GitHub Repository: nginx/nginx.org
Path: blob/main/xml/en/docs/http/ngx_http_dav_module.xml
1 views
1
<?xml version="1.0"?>
2
3
<!--
4
Copyright (C) Igor Sysoev
5
Copyright (C) Nginx, Inc.
6
-->
7
8
<!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
9
10
<module name="Module ngx_http_dav_module"
11
link="/en/docs/http/ngx_http_dav_module.html"
12
lang="en"
13
rev="2">
14
15
<section id="summary">
16
17
<para>
18
The <literal>ngx_http_dav_module</literal> module is intended for file
19
management automation via the WebDAV protocol.
20
The module processes HTTP and WebDAV
21
methods PUT, DELETE, MKCOL, COPY, and MOVE.
22
</para>
23
24
<para>
25
This module is not built by default, it should be enabled with the
26
<literal>--with-http_dav_module</literal>
27
configuration parameter.
28
</para>
29
30
<para>
31
<note>
32
WebDAV clients that require additional WebDAV methods to operate
33
will not work with this module.
34
</note>
35
</para>
36
37
</section>
38
39
40
<section id="example" name="Example Configuration">
41
42
<para>
43
<example>
44
location / {
45
root /data/www;
46
47
client_body_temp_path /data/client_temp;
48
49
dav_methods PUT DELETE MKCOL COPY MOVE;
50
51
create_full_put_path on;
52
dav_access group:rw all:r;
53
54
limit_except GET {
55
allow 192.168.1.0/32;
56
deny all;
57
}
58
}
59
</example>
60
</para>
61
62
</section>
63
64
65
<section id="directives" name="Directives">
66
67
<directive name="create_full_put_path">
68
<syntax><literal>on</literal> | <literal>off</literal></syntax>
69
<default>off</default>
70
<context>http</context>
71
<context>server</context>
72
<context>location</context>
73
74
<para>
75
The WebDAV specification only allows creating files in already
76
existing directories.
77
This directive allows creating all needed intermediate directories.
78
</para>
79
80
</directive>
81
82
83
<directive name="dav_access">
84
<syntax><value>users</value>:<value>permissions</value> ...</syntax>
85
<default>user:rw</default>
86
<context>http</context>
87
<context>server</context>
88
<context>location</context>
89
90
<para>
91
Sets access permissions for newly created files and directories, e.g.:
92
<example>
93
dav_access user:rw group:rw all:r;
94
</example>
95
</para>
96
97
<para>
98
If any <literal>group</literal> or <literal>all</literal> access permissions
99
are specified then <literal>user</literal> permissions may be omitted:
100
<example>
101
dav_access group:rw all:r;
102
</example>
103
</para>
104
105
</directive>
106
107
108
<directive name="dav_methods">
109
<syntax>
110
<literal>off</literal> | <value>method</value> ...</syntax>
111
<default>off</default>
112
<context>http</context>
113
<context>server</context>
114
<context>location</context>
115
116
<para>
117
Allows the specified HTTP and WebDAV methods.
118
The parameter <literal>off</literal> denies all methods processed
119
by this module.
120
The following methods are supported:
121
<literal>PUT</literal>, <literal>DELETE</literal>, <literal>MKCOL</literal>,
122
<literal>COPY</literal>, and <literal>MOVE</literal>.
123
</para>
124
125
<para>
126
A file uploaded with the PUT method is first written to a temporary file,
127
and then the file is renamed.
128
Starting from version 0.8.9, temporary files and the persistent store
129
can be put on different file systems.
130
However, be aware that in this case a file is copied
131
across two file systems instead of the cheap renaming operation.
132
It is thus recommended that for any given location both saved files and a
133
directory holding temporary files, set by the
134
<link doc="ngx_http_core_module.xml" id="client_body_temp_path"/>
135
directive, are put on the same file system.
136
</para>
137
138
<para>
139
When creating a file with the PUT method, it is possible to specify
140
the modification date by passing it in the <header>Date</header>
141
header field.
142
</para>
143
144
</directive>
145
146
147
<directive name="min_delete_depth">
148
<syntax><value>number</value></syntax>
149
<default>0</default>
150
<context>http</context>
151
<context>server</context>
152
<context>location</context>
153
154
<para>
155
Allows the DELETE method to remove files provided that
156
the number of elements in a request path is not less than the specified
157
number.
158
For example, the directive
159
<example>
160
min_delete_depth 4;
161
</example>
162
allows removing files on requests
163
<example>
164
/users/00/00/name
165
/users/00/00/name/pic.jpg
166
/users/00/00/page.html
167
</example>
168
and denies the removal of
169
<example>
170
/users/00/00
171
</example>
172
</para>
173
174
</directive>
175
176
</section>
177
178
</module>
179
180