This is a small howto to generate a webdav directory as subdirectory (alias) inside a domain. It's maybe not the best way, but it is working without any problems on my server!
My Server:
- Ubuntu 12.04.1 LTS
- iMSCP 1.1.0-rc1.4
- Apache2 with fcgi
No idea if this is working for another linux distribution or if you do not use fcgi!
All commands and configurations are made with user "root". If you have login to root disabled you have to use "sudo" as prefix for each comand.
BACKUP YOUR FILES FIRST! This howto is at your own risk!
First you have to enable the apache2 mod for dav:
Now restart apache2:
Go to the directory of your domain (e.g. "/var/www/virtual/domain.tld") and create two directories:
webdav: folder with your webdav files
webdavConfig: folder with webdav config files
Change folder permissions:
Replace vu2xxx with the user of your domain!
Create empty config files:
Change file permissions:
Replace vu2xxx with the user of your domain!
Add a user to your webdav space:
For more information how to add/del users: "htpasswd --help"
Go to directory "/etc/apache2/imscp" and open the webpage configuration for the domain you created the folders in (e.g. domain.tld.conf or subdomain.tld.conf).
Now add the following lines:
- Alias /webdav "/var/www/virtual/domain.tld/webdav"DavLockDB "/var/www/virtual/domain.tld/webdavConfig/lockdb"<Directory "/var/www/virtual/domain.tld/webdav"> DAV on Options +Indexes AuthType Basic AuthName "Webdav" AuthUserFile "/var/www/virtual/domain.tld/webdavConfig/.htpasswd" Require valid-user</Directory>
Note: If you are using one of the latest i-MSCP RC release, you must create the webdav and webdavConfig directories inside the 00_private directory.
Restart your apache2 again to enable this configuration:
Now you can access http://domain.tld/webdav by browser or by using webdav tools like NetDrive. If you have a ssl cert for your domain you can also access the webdav folder by https!
If you create the folders inside the "/var/www/virtual/domain.tld" iMSCP backup is creating a backup of it! (but I think it is not creating a backup of the edited /etc/apache2/imscp/domain.tld.conf file)