WebDAV setup

These documentation pages are no longer maintained. Please visit the new documentation site.

This document explains how to set up and use the beta version of the eZ WebDAV content administration sub-system. The functionality described here is new and will appear in Exponential 3.2 (also in beta releases).

A few words about WebDAV

WebDAV is an abbreviation for "Web-based Distributed Authoring and Versioning". It is a set of extensions to the HTTP protocol which allows users to collaboratively edit and manage files on remote web servers using WebDAV enabled clients. For example, you can use recent versions of KDE's Konqueror or Microsoft's Internet Explorer to browse/manage the content of a WebDAV compatible web server (similar to browsing/managing local filesystems). DAV is an IETF Proposed Standard (published as RFC 2518). This means that it is an entirely open standard.

Exponential and WebDAV

The beta version of Exponential 3.2 contains a WebDAV server library. This library provides a basic framework and takes care of the cubersome low level communication between a WebDAV client and the server itself. In other words, people can use this library to implement their own serveres very easily, since most of the dirty work is already done (and will be available under the GPL license).

In addition to the base library, there also exists a server (named eZWebDAVContentServer) which can be used to remotely administer the actual content of an Exponential site. This means that from now on, it will be possible to browse and manage the content (folders, articles, images, files, etc.) in the same fashion as when browsing a local filesystem. If you're running a recent version of Windows or KDE, you'll be able to log in and manage your content in a matter of seconds. The browsers of these systems already have built-in WebDAV support. There is no need to worry about firewalls since WebDAV is plain bi-directional HTTP traffic. If you are able to browse/surf the site from your workstation, you can use WebDAV to administer it.

Features

The WebDAV subsystem has just been implemented, it is therefore a bit limited. The user accessing the WebDAV interface must have administrator privileges in order to be able to browse and administer the content. For now, only the following operations are supported:

- Content browsing (navigation)
- File upload
- File download
- Folder creation
- Renaming

Content browsing
The WebDAV content server provides an interface for browsing the content of the site. Folders are displayed as folders/directories while binary files and images are displayed as regular files. For now / by default, everything else is displayed as folders.

File upload
From within a WebDAV enabled client running on some workstation, any kind of file may be uploaded to the server. If an image is uploaded, the content server subsystem will recognize it as an image and will automatically create an ezimage object. All other filetypes will be stored as ezbinary files.

File download
It is possible to download two things from the server to the local filesystem of the host running the WebDAV client: images and binary files.

Folder creation
It is possible to create folders. These will be created as regular folders within the site.

Folder/file renaming
It is possible to rename files and folders. There are currently some bugs in this feature. The second or third, and the following rename operations usually fail. This is due to a database issue that will be fixed later on.

Some of functionality mentioned above may be configured from within the WebDAV settings file (settings/webdav.ini).

Possible future features:
Copy operation (copy things from one location to another)
Move operation (move things from one location to another)
Delete operation (recursive removal of stuff)
Attribute manipulation (manipulation of certain attributes)
Multi user support (support for multiple users, with permissions, etc.)
Support & automatic parsing/processing + storage of common/various filetypes.

Setting it up

First of all, please keep in mind that the WebDAV subsystem of Exponential is still in the beta stage, it may not work correctly with every client. Secondly, please be patient and follow the setup instructions carefully, step-by-step. The WebDAV server has only been tested on the Linux platform, running Apache 1.3, PHP 4.3.2 and MySQL 4.1.0-alpha. Clients used for testing during development: various versions of Internet Explorer (mainly under Win2K and XP), the latest version of KDE's konqueror and a text mode client called nd. The following five steps describe how to set up the WebDAV content server.

(1) Enabling WebDAV functionality
The WebDAV functionality has to be enabled. Bring up the settings/webdav.ini file in your favourite editor and change the EnableWebDAV setting from false to true.

(2) DNS entry (optional)
Set up a subdomain as an alias for the hostname you use to access the site. For example, you could use "webdav.yoursite.net", which will have to point to the same IP address as www.yoursite.net. As the headline points out, this is optional - it isn't needed if you only want to test & see how the WebDAV system works. If omitted, you should simply replace "webdav.yoursite.net" with only "yoursite.net" in the following steps. You will still be able to test the WebDAV interface, however - the rewrite rule may mess up normal site browsing.

(3) Apache configuration
There is a "webdav.php" file in the root directory of the Exponential installation. This is the file that provides the WebDAV interface to the site content. The web server has to automatically execute this file whenever a WebDAV client issues a command to the server (browsing, upload, download, etc.). A virtual host section in httpd.conf should take care of this (look at the example below).

NameVirtualHost 192.168.101.1

 

#

# WebDAV setup for Exponential 3.4 (and pre 3.4)

#

<Virtualhost 192.168.101.1>

 <Directory /path/to/your/exponential/installation>

   Options FollowSymLinks Indexes ExecCGI

   AllowOverride None

 </Directory>

 RewriteEngine On

 RewriteRule !\.(css|jar|js|html|php)$ /webdav.php

 ServerAdmin root@localhost

 ServerName webdav.yoursite.net

</VirtualHost>

 

#

# WebDAV setup for Exponential 3.5

#

<Virtualhost 192.168.101.1>

 <Directory /path/to/your/exponential/installation>

   Options FollowSymLinks Indexes ExecCGI

   AllowOverride None

 </Directory>

 DocumentRoot /path/to/your/exponential/installation

 RewriteEngine On

 RewriteRule . /webdav.php

 ServerAdmin root@localhost

 ServerName webdav.yoursite.net

</VirtualHost>

If everything is running locally: it is still possible to set up and test WebDAV. In this case, the following line should be added to the local hosts file: "xxx.xxx.xxx.xxx webdav", where xxx.xxx.xxx.xxx is the real IP address of the computer. In addition, the ServerName setting in the VirtualHost declaration (see above) should be set to "webdav".

(4) Testing
Fire up a WebDAV enabled client and try to browse the site(s) using the WebDAV-URL.

Windows:
Should work okay from within Win2K and XP. However, sometimes it just fails under XP (will be fixed later). Make sure you have a recent version of Internet Explorer (6.0.2800.1106 or above) and attempt to connect to a so-called "Web Folder" (either from within IE's file menu -> open and check the "open as webfolder" box; or use "My Network Places"). Try to connect/browse using the following syntax: http://webdav.yoursite.net/

If everything is running on one computer (testing it locally with "xxx.xxx.xxx.xxx webdav" added to the local host file), the URL would be the following: http://webdav/

KDE/Konqueror:
Make sure you have a recent version of Konqueror (preferably 3.1.3 or later). Attempt to browse the WebDAV server using the following syntax: webdav://webdav.yoursite.net/

If everything is running on one computer (testing it locally with "xxx.xxx.xxx.xxx webdav" added to the local host file), the URL would be the following: webdav://webdav/

Please remember that you will need to log in with an Exponential user who has administrator privileges.

Comments

"All other filetypes will be stored as ezbinary files."

Why?
What about html? or txt?
I want to save my MS-word "Save As HTML" into the webdav folder...

So I had to write my own "upload handler" for text/html myme type.
Not that eZ but works.( not to mention charset problems)


An object containing an image attribute is displayed as an image

And the name has a .jpg at the end.

Took me a while to understand why one of my object was displayed as an image.

Some tips in ezp 3.3-2 and XP

Got it working under ezp 3.3-2 with WinXP. Some tips to consider:
- Don't forget "NameVirtualHost" in httpd.conf, otherwise your second (webdav-) virtualhost will never be reached.
- The variable SiteList[] in site.ini should be filled with the sitenames you'd like to connect to with webdav.
- Under windows XP, connecting to the webdav-virtualhost only worked using NetDrive.
- Connecting to the admin-site causes recursive "content" folders to appear. Use the actual sitename instead.

Change rewrite rule?

As pointed out by Paul Borgermans the rewrite rule for webdav.php should possibly not exclude any type of file, i.e. should be
RewriteRule (.*) /webdav.php

That way all file types could be uploaded, that might make sense for some users.

WebDAV reference

Here are a few site I found interesting when looking into WebDAV

Official WebDAV page - http://www.webdav.org/
Overview -http://www.atarex.com/services/webdav.shtml
MS and WebDAV - http://www.atarex.com/services/support/webdav-msft.shtml

optional http.conf change

The above virtual host setup did not work for me as it is.
I needed to change to rewrite rule to
RewriteRule !\.(css|jar|js|html|php)$ /path/to/the/root/of/your/exponential/installation/index_webdav.php

Contents

Configuration

Configuration
    WebDAV setup
    Exponential running on a CGI version o...
    Path prefix
    Locale Settings
    Introduction
    Configuration files
    Site access
    Common settings
    Multi Site
    Directory structure
    Language and charset
    Cron jobs
    Login handler
    Search engine
    Tips & Tricks
Security
Optimization
Backup & Restore
Troubleshooting


Created

21/08/2003
9:23:18 am
by Balazs Halasy

Last updated

04/12/2004
3:17:47 pm
by Balazs Halasy

Authors

Balazs Halasy



This page is part of the Exponential documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.