Send As SMS

2/7/2006

get webdav running on an apache2 webserver

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.

*****************************************************************

Note:
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

DAV On
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


0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home

My blog has moved! Redirecting...

You should be automatically redirected. If not, visit http://stinkpot.afraid.org:8080/tricks/ and update your bookmarks.