Feed on

here’s how to get webdav installed on an apache2 webserver (courtesy of “jason,” who posted this guide on a linux-users forum i came across some time ago). for those who’re curious why they’d need webdav running on their server: webdav is a service necessary for hosting an ical or sunbird calendar on a webserver.


Some of these options will differ for each distro. I use debian and apache2 from apt-get.

First you need to get webdav working:

apache2 already has these modules, you just need to enable them by making a symlink from mods-available to mods-enabled

#ln -s mods-available/dav* mods-enabled
#ls -l mods-enabled
should show you the following:
lrwxrwxrwx 1 root root 36 Feb 17 21:56 dav.load -> /etc/apache2/mods-available/dav.load
lrwxrwxrwx 1 root root 39 Feb 17 21:56 dav_fs.conf -> /etc/apache2/mods-available/dav_fs.conf
lrwxrwxrwx 1 root root 39 Feb 17 21:56 dav_fs.load -> /etc/apache2/mods-available/dav_fs.load

you can also use the a2enmod script
#a2enmod dav
#a2enmod dav_fs

Edit /etc/apache2/apache2.conf to add the following:

DAVLockDB /tmp/DAVLock
DAVMinTimeout 600

AuthType Basic
AuthName “WebDAV Restricted”
AuthUserFile /var/www/webdavpasswd

Require valid-user

Perform the following in your documentroot directory (check /etc/apache2/sites-enabled/default to see what yours is or to change it)

make your webdav folder
#mkdir /var/www/html/webdav
allow the apache2 permission to the webdav folder
#chown www-data.www-data /var/www/html/webdav
allow apache2 read, write and execute permission to the webdav folder, everyone else can only read and execute
#chmod 775 /var/www/html/webdav

Create a username and password for authentication
#htpasswd -c /var/www/webdavpasswd username
#htpasswd /var/www/webdavpasswd “other usernames”
(-c is to create new file, if used twice it will overwrite existing file)
enter password twice

Restart apache:
#/etc/init.d/apache2 restart

Bookmark and Share

if that was helpful ...

check out the other tips and tricks i've compiled on these pages. you might learn something else interesting!

Did I get this wrong? Let me know!

Trackback URI | Comments RSS