Posts Tagged ‘apache + davfs’

How to Copy Files over davfs

August 14th, 2011

Rebuild Apache with DAV support i.e. –with-dav –enable-dav
Edit the http.conf, add virtual hosting as follows and setup password using htpasswd -c /home/manoj/davfs/passwd.dav manoj

<IfModule mod_dav_fs.c>
# Location of the WebDAV lock database.
DAVLockDB //home/manoj/davfs/lockdb
</IfModule>

NameVirtualHost *:8899
<VirtualHost *:8899>
ServerAdmin webmaster@localhost

DocumentRoot /home/manoj/davfs/web
<Directory /home/manoj/davfs/web>
Options Indexes MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>

</VirtualHost>
Alias /webdav /home/manoj/davfs/web

<Location /webdav>
DAV On
AuthType Basic
AuthName “webdav”
AuthUserFile /home/manoj/davfs/passwd.dav
Require valid-user
</Location>

Restart apache to load the DAV module

Add user in Linux and assign to a group users or some other

adduser -u 500 -g 500 manoj
Assign manoj user to users group
usermod  -a -G users manoj

Installing davfs2 on Linux Server

download Davfs2 rpm using below URL

wget http://tdp.coe.hawaii.edu/yum/centos/5/i386/rpmforge/davfs2-1.2.2-4.el5.rf.i386.rpm
rpm -ivh davfs2-1.2.2-4.el5.rf.i386.rpm

Mounting of davfs file system into local folder, we can do it using below command
mount -t davfs -o file_mode=775,dir_mode=775,uid=manoj http://192.168.19.200:8899/webdav/ /home/manoj/davfs/mnt/

Install WebDAV in apache Servers

October 29th, 2010

Download the Apache Web Server source code from the Apache website, e.g. httpd-2.x.x.tar.gz. The mod_dav module is inlcuded with the Apache 2 distribution. Configure and compile Apache:

./configure –prefix=/usr/local/apache2 –with-dav –enable-dav
(./configure –prefix=/usr/local/apache2 –with-dav –enable-dav –enable-proxy –enable-proxy-http)
make
make install
/usr/local/apache2/bin/httpd -l | grep dav

You need to reconfigure Apache:

DAVLockDB /usr/local/apache2/logs/DavLock
<Directory “/usr/local/apache2/htdocs”>
Dav On
</Directory>