Installl webdav in Ubuntu 11.04
- Install apache and encoding moduls
sudo apt-get install apache2 libapache2-mod-encoding
I-2 enable webdav modules
a2enmod dav_fs a2enmod dav
1-3 create webdave directory and add permissions
mkdir -p /var/www/webdav
chown www-data. /var/www/webdav
chmod 770 /var/www/webdav
1-4 Restart apche2 to take the last modifications
/etc/init.d/apache2 restart
Now configure webdav Server
vi /etc/apache2/conf.d/webdav.conf
and add
######################################################################################
Alias /webdav /var/www/webdav
<Location /webdav>
DAV On
#SSLRequireSSL
Options None
AuthType Basic
AuthName WebDAV
AuthUserFile /etc/apache2/conf.d/.htpasswd
<LimitExcept GET OPTIONS>
Order allow,deny
Allow from all
# IP address you allow
Require valid-user
</LimitExcept>
</Location>
#######################################################################################
II-run this command to apply thewebdav encoding
a2enmod dav* encoding
Enabling module dav. Considering dependency dav for dav_fs: Module dav already enabled Enabling module dav_fs. Enabling module dav_lock. Enabling module encoding. Run '/etc/init.d/apache2 restart' to activate new configuration!
III-Make access to webdav server for user admin
III-1 run under root access
htpasswd -c /etc/apache2/conf.d/.htpasswd admin
New password:
# set password
Re-type new password:
# confirm
Adding password for user admin
/etc/init.d/apache2 restart
* Restarting web server apache2 ... waiting ...done.
