summaryrefslogtreecommitdiff
path: root/pod/nginx/ngx_http_dav_module.pod
blob: 603880586d00bd946066f272ecf97151b4fc39aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
=encoding utf-8

=head1 NAME

ngx_http_dav_module - Module ngx_http_dav_module




=head1



The C<ngx_http_dav_module> module is intended for file
management automation via the WebDAV protocol.
The module processes HTTP and WebDAV
methods PUT, DELETE, MKCOL, COPY, and MOVE.





This module is not built by default, it should be enabled with the
C<--with-http_dav_module>
configuration parameter.






B<NOTE>

WebDAV clients that require additional WebDAV methods to operate
will not work with this module.





=head1 Example Configuration




    
    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;
        }
    }






=head1 Directives

=head2 create_full_put_path


B<syntax:> create_full_put_path I<C<on> E<verbar> C<off>>


B<default:> I<off>


B<context:> I<http>


B<context:> I<server>


B<context:> I<location>





The WebDAV specification only allows creating files in already
existing directories.
This directive allows creating all needed intermediate directories.







=head2 dav_access


B<syntax:> dav_access I<I<C<users>>:I<C<permissions>> ...>


B<default:> I<user:rw>


B<context:> I<http>


B<context:> I<server>


B<context:> I<location>





Sets access permissions for newly created files and directories, e.g.:

    
    dav_access user:rw group:rw all:r;







If any C<group> or C<all> access permissions
are specified then C<user> permissions may be omitted:

    
    dav_access group:rw all:r;









=head2 dav_methods


B<syntax:> dav_methods I<
    C<off> E<verbar> I<C<method>> ...>


B<default:> I<off>


B<context:> I<http>


B<context:> I<server>


B<context:> I<location>





Allows the specified HTTP and WebDAV methods.
The parameter C<off> denies all methods processed
by this module.
The following methods are supported:
C<PUT>, C<DELETE>, C<MKCOL>,
C<COPY>, and C<MOVE>.





A file uploaded with the PUT method is first written to a temporary file,
and then the file is renamed.
Starting from version 0.8.9, temporary files and the persistent store
can be put on different file systems.
However, be aware that in this case a file is copied
across two file systems instead of the cheap renaming operation.
It is thus recommended that for any given location both saved files and a
directory holding temporary files, set by the
L<ngx_http_core_module>
directive, are put on the same file system.





When creating a file with the PUT method, it is possible to specify
the modification date by passing it in the C<Date>
header field.







=head2 min_delete_depth


B<syntax:> min_delete_depth I<I<C<number>>>


B<default:> I<0>


B<context:> I<http>


B<context:> I<server>


B<context:> I<location>





Allows the DELETE method to remove files provided that
the number of elements in a request path is not less than the specified
number.
For example, the directive

    
    min_delete_depth 4;


allows removing files on requests

    
    /users/00/00/name
    /users/00/00/name/pic.jpg
    /users/00/00/page.html


and denies the removal of

    
    /users/00/00