apache2-2.2.0-21 + WebDAV

11/Aug/2006 tested on SuSE 10.1

WevDAV stands for Web-based Distributed Authoring and Versioning. The aim is to make the World Wide Web a readable and writable medium.

Installation

  • Apache2 supports WebDAV in default, so we do not need to install any modules.
  • Edit /etc/sysconfit/apache2, on APACHE_MODULES line, and add "dav dav_fs" with space separated as,
    ...
    APACHE_MODULES="actions alias auth_basic authn_file authz_host authz_groupfile auth
    z_default authz_user authn_dbm autoindex cgi dir env expires include log_config mim
    e negotiation setenvif ssl suexec userdir php5 dav dav_fs"
    ...
    
    Note: You can also use /etc/sysconfig Editor at YaST.
  • Create WebDAV directory, as
    # mkdir /srv/www/dav
    # chown wwwrun:www /srv/www/dav
    # mkdir /var/lock/dav
    # chown wwwrun:www /var/lock/dav
    
  • Create /etc/apache2/conf.d/dav.conf
    DavLockDB /var/lock/dav/DavLock
    Alias /dav "/srv/www/dav"
    <IfModule mod_dav.c>
        DAVMinTimeout 600
        <Location /dav>
            DAV On
            Options Indexes
    #        SSLRequireSSL
            <Limit All>
                Allow from all
            </Limit>
        </Location>
    </IfModule>
    
    If you use SSL, enable the SSLRequireSSL line.
  • Restart Apache
    # /etc/init.d/apache2 restart
    
  • Connection from Windows XP

  • Windows 2000 Professional and Windows XP supports WevDAV. However, XP can not add the WebDAV folder by authentication screen. To solve this issue, stop "WewbClient" service during adding the network place, and then start after this.
  • Open "My Network Places", double click "Add Network Place" to start "Add Network Place Wizard".
  • At "Internet or network address" text box, enter URL as "http://hostname/dav/", and click "Next".
  • If WebDAV is working, type a name of the WevDAV name, and click "Next", and "Finish".
  • Test copying and deleting files on the Web folder.
  • Digest Authentication

  • We need to implement a writing security to the folder. Basic Authentication is widely used with Apache, but it is not secure. We use Digest Authentication to improve the security.
  • Create a password file. You do not need to use -c option from the second user.
    # htpasswd2 -c /etc/apache2/.htpasswd guest
    New password:
    Re-type new password:
    Adding password for user guest
    
  • Edit /etc/apache2/conf.d/dav.conf
    DavLockDB /var/lock/dav/DavLock
    Alias /dav "/srv/www/dav"
    <IfModule mod_dav.c>
        DAVMinTimeout 600
        <Location /dav>
            DAV On
            Options Indexes
    #        SSLRequireSSL
            AuthType Basic
            AuthName "WebDAV"
            AuthUserFile "/etc/apache2/.htpasswd"
            Order deny,allow
            Deny from all
            Allow from 192.168.0.0/24
            <Limit All>
                Allow from all
            </Limit>
        </Location>
    </IfModule>
    
  • Restart Apache
    # /etc/init.d/apache2 restart
    

  • Back
    Google
    Web www.grape-info.com