Setting up a webDAV PDF Print E-mail
User Rating: / 0
PoorBest 
Written by Bart Dorlandt   
Monday, 30 July 2007 16:44

Todays howto is setting up a webdav with apache in OpenBSD.

First thing to do is installing the mod_dav (I use OpenBSD 4.0), and follow the steps (enabling mod_dav)

pkg_add ftp://ftp.openbsd.org/pub/OpenBSD/4.0/packages/i386/mod_dav-1.0.3p1.tgz

Create a directory inside your virtualhost (or your regular if you use only one)

mkdir /var/www/htdocs/your.domain.tld/webdav
chown www:www /var/www/htdocs/your.domain.tld/webdav

I've added the following configuration in my virtualhost.

DAVLockDB               /var/run/DAVlock
<Directory /var/www/htdocs/your.domain.tld/webdav>
DAV On
Options Indexes MultiViews
AllowOverride None
Order allow,deny
allow from all

AuthUserFile /var/www/accounts/htpasswd
AuthGroupFile /dev/null
AuthName "Username and password"
AuthType Basic
Require valid-user
</Directory>

Make sure the user or group www is able to write in /var/run/. DAVlock is used for temporary info.

Now we have to create a user with a password so he/she is able to login. I use MD5 encryption for my passwords, see -m

htpasswd -m /var/www/accounts/htpasswd bart

Fill in your password twice and your password is added to the existing password file. If you don't have a password file yet you can create one with the -c option.

Restart apache and test it. You can test it with konqueror, it supports the webdav(s) protocol. Just type:

webdavs://your.domain.tld/webdav

Last Updated on Friday, 13 February 2009 15:29
 


Related items: