See Also: Home Links Personal Site Blogroll  FriendFeed CV

Tags:

Topic Image

WebDAV

Nice short read on WebDAV uptake in the CMS industry...

Publishing with WebDAV

Following are some notes made after attending a session at OSCon02 on Publishing with WebDAV presented by Greg Stein, author of the Apache DAV module.

Greg is also involved with the 'subversion' project, a replacement for CVS... http://subversion.tigris.org/

His talk was split between talking about DAV in general, how it integrates with Apache, and some low-level stuff about the actual implementation (which I kinda ignored coz it was aimed at DAV developers)

We had been trialling WebDAV on web servers at work but some stuff that was new from the talk....

Apache2New Page.0 has WebDAV built into the core apache binary. The base DAV support module in apache talks to providers which in turn deal with the storage repository that they are written to interface to.

The standard 'provider' is the file-system one, which allows for the sort of DAV interaction that the module on Asterix currently offers. The idea with this extra layer is that folks will hopefully come along with providers for other stores, e.g. CVS

A couple of people raised the issue of the anonymous web server acct having write access to the web volume, and Greg emphasised the need to ensure that noone else has write access to the DAV folder, that way the permissions dont get screwed up.

He suggested that you could use multiple instances of apache (running as different users) writing to different areas of the file-system and use a proxy-pass to act as an intermediary between the different stores so they appear to be from the same name/webspace.

He introduced the concept of 'dead' and 'live' properties for objects (files) in the DAV store. Each file can be tagged with certain user-defined properties, and these get written into the DAV store database in the collection (folder). These are 'dead' properties.

The properties in the database are saved as XML fragments, but they arent stand-alone XML documents as such. The properties are saved in fields in the database, which is in the DBM format.

'live' properties are typically server-generated, stuff that the server inpects or notices about the collection objects. These are typically not stored.

There's a custom property that can be set on a folder that allows uploading of files which can be marked as executable, e.g. CGI scripts. This would let you author CGI stuff from afar on a DAV client.

Using WebDAV in Apache

you'll need to load the module in http.conf...

LoadModule dav_module libexec/libdav.so

and specify where the lockfile database will exist...

DAVLockDB /path/to/DAVLockFile
DAVDepthInfinity Off

You'll then need to allow GET, HEAD, OPTIONS and PROPFIND protocol access to a folder you want to DAV enable...

<Directory /path/to/mydavfolder/>
    DAV On
    AllowOverride None
    Options None
    <LimitExcept GET HEAD OPTIONS PROPFIND>
      AuthName "DAV Authors Only"
      AuthType Basic
      AuthGroupFile /home/www/.htgroup
      require group mydavgroup
    </LimitExcept>
</Directory>


See Also: OS Con 02 | Content Management | Notes Index