DAV stands for "Distributed Authoring and Versioning", apparently. Not a particularly descriptive name, but quite a useful technology, and extremely simple to use.

Setting up the Server

DAV is an extension to HTTP, so the first thing you'll need is a working Apache installation. I won't cover that here - there are plenty of howtos on getting Apache running. Be sure to have appropriate certificates etc. if you want to use HTTPS.

Apache needs very little configuration to run DAV - in fact, all the major stuff was already configured for my distro (Whitebox Linux). Check to see if you have the following directives in your Apache config file :-

[[LoadModule]] dav_module modules/mod_dav.so
[[LoadModule]] dav_fs_module modules/mod_dav_fs.so

<[[IfModule]] mod_dav_fs.c>

    `# Location of the [[WebDAV]] lock database.`
    `[[DAVLockDB]] /var/lib/dav/lockdb`

From this point on, it's just a case of turning on DAV for those areas you want them. So, for example, if you have a directory /var/www/davtest that you want to be able to update from any workstation on the LAN, but browse from anywhere, the following will work :-

Alias /davtest /var/www/davtest

<Location /davtest>

  `Order deny,allow`
  `Deny from all`
  `Allow from`
  `DAV On`
  `Options +Indexes`

The important line here is DAV On. This does exactly what you expect :-)

All the usual Apache constructs can be placed in the <Location> stanza, so access control can be implemented here (but I didn't want to).

Force Apache to re-read its config (with apachectl graceful), and you now have a working DAV server.

Setting up the Client


Gnome-VFS supports DAV, so running a Gnome DAV client is trivial.

In the Nautilus File menu, there is an option "Connect to Server". Choose this.

The window that appears has a "Service Type" chooser. Select either "WebDAV" or "Secure WebDAV" (depending on whether or not you want encryption on the link). Enter the name of the server in the "Server" box, and the directory ("/davtest" for the example above) in the "Folder" box.

If you have set up access control, enter a username in the appropriate box. If you want a particular name by which the mount will be known, enter one in the "Name to use for connection" box.

Press "Connect", and you should get a new Nautilus browser, showing the remote directory.

To close the connection once you've finished, unmount it. There will probably be an icon on the desktop, an entry in the "computer:///" browse window, etc. Right-click one of those and select "Unmount Volume".


Konqueror seems to support the "webdav://" method.

Other Linux

DAV can be used by other means in Linux, including DavFS, which allows you to mount a DAV filesystem directly into your filesystem tree, and Cadaver, which is a command-line client.


LinuxHints/SettingUpWebDAV (last edited 2006-09-05 13:23:21 by 213)