upload http
[bottlenecks.git] / rubbos / app / httpd-2.0.64 / docs / manual / mod / mod_dav.html.en
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
4         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5               This file is generated from xml source: DO NOT EDIT
6         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7       -->
8 <title>mod_dav - Apache HTTP Server</title>
9 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
10 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
11 <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
12 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
13 <body>
14 <div id="page-header">
15 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
16 <p class="apache">Apache HTTP Server Version 2.0</p>
17 <img alt="" src="../images/feather.gif" /></div>
18 <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
19 <div id="path">
20 <a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.0</a> &gt; <a href="./">Modules</a></div>
21 <div id="page-content">
22 <div id="preamble"><h1>Apache Module mod_dav</h1>
23 <div class="toplang">
24 <p><span>Available Languages: </span><a href="../en/mod/mod_dav.html" title="English">&nbsp;en&nbsp;</a> |
25 <a href="../ja/mod/mod_dav.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
26 <a href="../ko/mod/mod_dav.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
27 </div>
28 <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Distributed Authoring and Versioning
29 (<a href="http://www.webdav.org/">WebDAV</a>) functionality</td></tr>
30 <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Extension</td></tr>
31 <tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>dav_module</td></tr>
32 <tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_dav.c</td></tr></table>
33 <h3>Summary</h3>
34
35     <p>This module provides class 1 and class 2 <a href="http://www.webdav.org">WebDAV</a> ('Web-based Distributed
36     Authoring and Versioning') functionality for Apache. This
37     extension to the HTTP protocol allows creating, moving,
38     copying, and deleting resources and collections on a remote web
39     server.</p>
40 </div>
41 <div id="quickview"><h3 class="directives">Directives</h3>
42 <ul id="toc">
43 <li><img alt="" src="../images/down.gif" /> <a href="#dav">Dav</a></li>
44 <li><img alt="" src="../images/down.gif" /> <a href="#davdepthinfinity">DavDepthInfinity</a></li>
45 <li><img alt="" src="../images/down.gif" /> <a href="#davmintimeout">DavMinTimeout</a></li>
46 </ul>
47 <h3>Topics</h3>
48 <ul id="topics">
49 <li><img alt="" src="../images/down.gif" /> <a href="#example">Enabling WebDAV</a></li>
50 <li><img alt="" src="../images/down.gif" /> <a href="#security">Security Issues</a></li>
51 <li><img alt="" src="../images/down.gif" /> <a href="#complex">Complex Configurations</a></li>
52 </ul><h3>See also</h3>
53 <ul class="seealso">
54 <li><code class="directive"><a href="../mod/mod_dav_fs.html#davlockdb">DavLockDB</a></code></li>
55 <li><code class="directive"><a href="../mod/core.html#limitxmlrequestbody">LimitXMLRequestBody</a></code></li>
56 <li><a href="http://www.webdav.org">WebDAV Resources</a></li>
57 </ul></div>
58 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
59 <div class="section">
60 <h2><a name="example" id="example">Enabling WebDAV</a></h2>
61     <p>To enable <code class="module"><a href="../mod/mod_dav.html">mod_dav</a></code>, add the following to a
62     container in your <code>httpd.conf</code> file:</p>
63
64     <div class="example"><p><code>Dav On</code></p></div>
65
66     <p>This enables the DAV file system provider, which is implemented
67     by the <code class="module"><a href="../mod/mod_dav_fs.html">mod_dav_fs</a></code> module. Therefore, that module
68     must be compiled into the server or loaded at runtime using the
69     <code class="directive"><a href="../mod/mod_so.html#loadmodule">LoadModule</a></code> directive.</p>
70     
71     <p>In addition, a location for the DAV lock database must be
72     specified in the global section of your <code>httpd.conf</code>
73     file using the <code class="directive"><a href="../mod/mod_dav_fs.html#davlockdb">DavLockDB</a></code>
74     directive:</p>
75
76     <div class="example"><p><code>
77       DavLockDB /usr/local/apache2/var/DavLock
78     </code></p></div>
79
80     <p>The directory containing the lock database file must be
81     writable by the <code class="directive"><a href="../mod/mpm_common.html#user">User</a></code>
82     and <code class="directive"><a href="../mod/mpm_common.html#group">Group</a></code> under which
83     Apache is running.</p>
84
85     <p>You may wish to add a <code class="directive"><a href="../mod/core.html#limit">&lt;Limit&gt;</a></code> clause inside the <code class="directive"><a href="../mod/core.html#location">&lt;Location&gt;</a></code> directive to limit access to
86     DAV-enabled locations. If you want to set the maximum amount of
87     bytes that a DAV client can send at one request, you have to use
88     the <code class="directive"><a href="../mod/core.html#limitxmlrequestbody">LimitXMLRequestBody</a></code>
89     directive. The "normal" <code class="directive"><a href="../mod/core.html#limitrequestbody">LimitRequestBody</a></code> directive has no effect on DAV
90     requests.</p>
91
92     <div class="example"><h3>Full Example</h3><p><code>
93       DavLockDB /usr/local/apache2/var/DavLock<br />
94       <br />
95        &lt;Location /foo&gt;<br />
96        <span class="indent">
97          Dav On<br />
98          <br />
99          AuthType Basic<br />
100          AuthName DAV<br />
101          AuthUserFile user.passwd<br />
102          <br />
103          &lt;LimitExcept GET OPTIONS&gt;<br />
104          <span class="indent">
105            require user admin<br />
106          </span>
107          &lt;/LimitExcept&gt;<br />
108        </span>
109        &lt;/Location&gt;<br />
110     </code></p></div>
111
112    <p><code class="module"><a href="../mod/mod_dav.html">mod_dav</a></code> is a descendent of Greg Stein's <a href="http://www.webdav.org/mod_dav/">mod_dav for Apache 1.3</a>.  More
113    information about the module is available from that site.</p>
114 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
115 <div class="section">
116 <h2><a name="security" id="security">Security Issues</a></h2>
117
118     <p>Since DAV access methods allow remote clients to manipulate
119     files on the server, you must take particular care to assure that
120     your server is secure before enabling <code class="module"><a href="../mod/mod_dav.html">mod_dav</a></code>.</p>
121
122     <p>Any location on the server where DAV is enabled should be
123     protected by authentication.  The use of HTTP Basic Authentication
124     is not recommended. You should use at least HTTP Digest
125     Authentication, which is provided by the
126     <code class="module"><a href="../mod/mod_auth_digest.html">mod_auth_digest</a></code> module. Nearly all WebDAV clients
127     support this authentication method. An alternative is Basic
128     Authentication over an <a href="../ssl/">SSL</a> enabled
129     connection.</p>
130
131     <p>In order for <code class="module"><a href="../mod/mod_dav.html">mod_dav</a></code> to manage files, it must
132     be able to write to the directories and files under its control
133     using the <code class="directive"><a href="../mod/mpm_common.html#user">User</a></code> and
134     <code class="directive"><a href="../mod/mpm_common.html#group">Group</a></code> under which
135     Apache is running.  New files created will also be owned by this
136     <code class="directive"><a href="../mod/mpm_common.html#user">User</a></code> and <code class="directive"><a href="../mod/mpm_common.html#group">Group</a></code>.  For this reason, it is
137     important to control access to this account.  The DAV repository
138     is considered private to Apache; modifying files outside of Apache
139     (for example using FTP or filesystem-level tools) should not be
140     allowed.</p>
141
142     <p><code class="module"><a href="../mod/mod_dav.html">mod_dav</a></code> may be subject to various kinds of
143     denial-of-service attacks.  The <code class="directive"><a href="../mod/core.html#limitxmlrequestbody">LimitXMLRequestBody</a></code> directive can be
144     used to limit the amount of memory consumed in parsing large DAV
145     requests.  The <code class="directive"><a href="#davdepthinfinity">DavDepthInfinity</a></code> directive can be
146     used to prevent <code>PROPFIND</code> requests on a very large
147     repository from consuming large amounts of memory.  Another
148     possible denial-of-service attack involves a client simply filling
149     up all available disk space with many large files.  There is no
150     direct way to prevent this in Apache, so you should avoid giving
151     DAV access to untrusted users.</p>
152 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
153 <div class="section">
154 <h2><a name="complex" id="complex">Complex Configurations</a></h2>
155
156     <p>One common request is to use <code class="module"><a href="../mod/mod_dav.html">mod_dav</a></code> to
157     manipulate dynamic files (PHP scripts, CGI scripts, etc).  This is
158     difficult because a <code>GET</code> request will always run the
159     script, rather than downloading its contents.  One way to avoid
160     this is to map two different URLs to the content, one of which
161     will run the script, and one of which will allow it to be
162     downloaded and manipulated with DAV.</p>
163
164 <div class="example"><p><code>
165 Alias /phparea /home/gstein/php_files<br />
166 Alias /php-source /home/gstein/php_files<br />
167 &lt;Location /php-source&gt;
168 <span class="indent">
169     DAV On<br />
170     ForceType text/plain<br />
171 </span>
172 &lt;/Location&gt;
173 </code></p></div>
174
175     <p>With this setup, <code>http://example.com/phparea</code> can be
176     used to access the output of the PHP scripts, and
177     <code>http://example.com/php-source</code> can be used with a DAV
178     client to manipulate them.</p>
179 </div>
180 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
181 <div class="directive-section"><h2><a name="Dav" id="Dav">Dav</a> <a name="dav" id="dav">Directive</a></h2>
182 <table class="directive">
183 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enable WebDAV HTTP methods</td></tr>
184 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Dav On|Off|<var>provider-name</var></code></td></tr>
185 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Dav Off</code></td></tr>
186 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
187 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
188 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_dav</td></tr>
189 </table>
190     <p>Use the <code class="directive">Dav</code> directive to enable the
191     WebDAV HTTP methods for the given container:</p>
192
193     <div class="example"><p><code>
194       &lt;Location /foo&gt;<br />
195       <span class="indent">
196         Dav On<br />
197       </span>
198       &lt;/Location&gt;
199     </code></p></div>
200
201     <p>The value <code>On</code> is actually an alias for the default
202     provider <code>filesystem</code> which is served by the <code class="module"><a href="../mod/mod_dav_fs.html">mod_dav_fs</a></code> module. Note, that once you have DAV enabled
203     for some location, it <em>cannot</em> be disabled for sublocations.
204     For a complete configuration example have a look at the <a href="#example">section above</a>.</p>
205
206     <div class="warning">
207       Do not enable WebDAV until you have secured your server. Otherwise
208       everyone will be able to distribute files on your system.
209     </div>
210
211 </div>
212 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
213 <div class="directive-section"><h2><a name="DavDepthInfinity" id="DavDepthInfinity">DavDepthInfinity</a> <a name="davdepthinfinity" id="davdepthinfinity">Directive</a></h2>
214 <table class="directive">
215 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Allow PROPFIND, Depth: Infinity requests</td></tr>
216 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DavDepthInfinity on|off</code></td></tr>
217 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>DavDepthInfinity off</code></td></tr>
218 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
219 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
220 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_dav</td></tr>
221 </table>
222     <p>Use the <code class="directive">DavDepthInfinity</code> directive to
223     allow the processing of <code>PROPFIND</code> requests containing the
224     header 'Depth: Infinity'. Because this type of request could constitute
225     a denial-of-service attack, by default it is not allowed.</p>
226
227 </div>
228 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
229 <div class="directive-section"><h2><a name="DavMinTimeout" id="DavMinTimeout">DavMinTimeout</a> <a name="davmintimeout" id="davmintimeout">Directive</a></h2>
230 <table class="directive">
231 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Minimum amount of time the server holds a lock on
232 a DAV resource</td></tr>
233 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DavMinTimeout <var>seconds</var></code></td></tr>
234 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>DavMinTimeout 0</code></td></tr>
235 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
236 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
237 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_dav</td></tr>
238 </table>
239     <p>When a client requests a DAV resource lock, it can also
240     specify a time when the lock will be automatically removed by
241     the server. This value is only a request, and the server can
242     ignore it or inform the client of an arbitrary value.</p>
243
244     <p>Use the <code class="directive">DavMinTimeout</code> directive to specify, in
245     seconds, the minimum lock timeout to return to a client.
246     Microsoft Web Folders defaults to a timeout of 120 seconds; the
247     <code class="directive">DavMinTimeout</code> can override this to a higher value
248     (like 600 seconds) to reduce the chance of the client losing
249     the lock due to network latency.</p>
250
251     <div class="example"><h3>Example</h3><p><code>
252       &lt;Location /MSWord&gt;<br />
253       <span class="indent">
254         DavMinTimeout 600<br />
255       </span>
256       &lt;/Location&gt;
257     </code></p></div>
258
259 </div>
260 </div>
261 <div class="bottomlang">
262 <p><span>Available Languages: </span><a href="../en/mod/mod_dav.html" title="English">&nbsp;en&nbsp;</a> |
263 <a href="../ja/mod/mod_dav.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
264 <a href="../ko/mod/mod_dav.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
265 </div><div id="footer">
266 <p class="apache">Copyright 2009 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
267 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>
268 </body></html>