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