WebDAV is an abbreviation for "Web-based Distributed Authoring and Versioning" (published as an open standard under RFC 2518). WebDAV is a set of extensions to the HTTP protocol which allows users to collaboratively edit and manage files on a web server. Using a WebDAV compatible client, the user connects to the server and is able to browse and manage files in a similar way as with a network share or an FTP server. In other words, what this protocol does is that it makes it possible to browse, create, remove, upload, download, rename, etc. files and directories on a web server. One of the most important advantages of this technology is that it uses port 80 for network traffic. This means that if you are able to surf the site from your workstation, you can also use WebDAV to administer it.
Configuration
The first you need to do is to set up a virtualhost for your webserver.
Apache HTTPD
<VirtualHost 89.250.126.18>
ServerName webdav.lotto-kim.net
<Directory /home/sites/lotto-kim.net/www>
Options indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from All
</Directory>
DocumentRoot /home/sites/lotto-kim.net/www
RewriteEngine On
RewriteRule !\.(css|jar|js|html|php)$
/home/sites/lotto-kim.net/www/webdav.php
CustomLog "|/usr/sbin/rotatelogs2
/var/log/sites/www.lotto-kim.net/www 3600" combined
ErrorLog "/var/log/sites/www.lotto-kim.net/error_log
RewriteLog /var/log/sites/www.lotto-kim.net/rewrite_log
RewriteLogLevel 0
<Location />
php_admin_value upload_tmp_dir /home/sites/lotto-kim.net/tmp
php_admin_value open_basedir /home/sites/lotto-kim.net:
/usr/local/bin:/usr/local/imagemagick/bin:
</Location>
</VirtualHost>
Lighttpd
$HTTP["host"] == "webdav.lotto-kim.net" {
var.server_name = "webdav.lotto-kim.net"
server.name = server_name
server.document-root = server_root + "lotto-kim.net/www"
accesslog.filename = "/var/log/sites/lotto-kim.net/www"
url.rewrite-once = ("^/.*$" => "/webdav.php")
}
Enable WebDav in eZ Publish
WebDav is disabled in eZ Publish as default, so we need to be enable it to get it working.
# echo -e "[GeneralSettings]\nEnableWebDAV=true\n" >> webdav.ini.append.php
Testing
I'm using cadaver to check if webdav is working on my domain, you can of course use other clients as well.
# cadaver webdav.lotto-kim.net dav:/> ls site Listing collection `/site/': Authentication required for eZ publish WebDAV interface on server `webdav.lotto-kim.net': Username: admin Password: Retrying: succeeded. Coll: Content 0 Aug 23 21:11 Coll: Media 0 Aug 23 21:11 dav:/> ls Listing collection `/': succeeded. Coll: eng 0 Aug 23 21:11 Coll: site 0 Aug 23 21:11 Coll: siteadmin 0 Aug 23 21:11 dav:/> cd site dav:/site/> ls Listing collection `/site/': succeeded. Coll: Content 0 Aug 23 21:11 Coll: Media 0 Aug 23 21:11 dav:/site/> cd Content dav:/site/Content/> ls Listing collection `/site/Content/': succeeded. Coll: Blog 0 Aug 23 21:47 Coll: Contact 0 Aug 27 23:05 Coll: Photos 0 Aug 27 23:06 Coll: Projects 0 Aug 27 23:07
New site is up and running, it will properly be a temporary project and will be dead within some few days
Add comment