github.com/krum110487/go-htaccess@v0.0.0-20240316004156-60641c8e7598/tests/data/apache_2_4_58/conf/extra/httpd-dav.conf (about)

     1  #
     2  # Distributed authoring and versioning (WebDAV)
     3  #
     4  # Required modules: mod_alias, mod_auth_digest, mod_authn_core, mod_authn_file,
     5  #                   mod_authz_core, mod_authz_user, mod_dav, mod_dav_fs,
     6  #                   mod_setenvif
     7  
     8  # The following example gives DAV write access to a directory called
     9  # "uploads" under the ServerRoot directory.
    10  #
    11  # The User/Group specified in httpd.conf needs to have write permissions
    12  # on the directory where the DavLockDB is placed and on any directory where
    13  # "Dav On" is specified.
    14  
    15  DavLockDB "${SRVROOT}/var/DavLock"
    16  
    17  Alias /uploads "${SRVROOT}/uploads"
    18  
    19  <Directory "${SRVROOT}/uploads">
    20      Dav On
    21  
    22      AuthType Digest
    23      AuthName DAV-upload
    24      # You can use the htdigest program to create the password database:
    25      #   htdigest -c "${SRVROOT}/user.passwd" DAV-upload admin
    26      AuthUserFile "${SRVROOT}/user.passwd"
    27      AuthDigestProvider file
    28  
    29      # Allow universal read-access, but writes are restricted
    30      # to the admin user.
    31      <RequireAny>
    32          Require method GET POST OPTIONS
    33          Require user admin
    34      </RequireAny>
    35  </Directory>
    36  
    37  #
    38  # The following directives disable redirects on non-GET requests for
    39  # a directory that does not include the trailing slash.  This fixes a 
    40  # problem with several clients that do not appropriately handle 
    41  # redirects for folders with DAV methods.
    42  #
    43  BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
    44  BrowserMatch "MS FrontPage" redirect-carefully
    45  BrowserMatch "^WebDrive" redirect-carefully
    46  BrowserMatch "^WebDAVFS/1.[01234]" redirect-carefully
    47  BrowserMatch "^gnome-vfs/1.0" redirect-carefully
    48  BrowserMatch "^XML Spy" redirect-carefully
    49  BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
    50  BrowserMatch " Konqueror/4" redirect-carefully