Apr 08, '01 08:15:24PM • Contributed by: scottboms
If you want to run your web server with WebDAV capabilities enabled on it, you will need to download the latest version of mod_dav, configure and install it, replacing the pre-installed module for Apache. The information for installing mod_dav can be found on the mod_dav site, but I will summarize it here.
Read the rest of the article for an excellent how-to on installing WebDAV support onto your new Apache...
Build and Install Steps:
There are two options for installing mod_dav into your Apache installation. The first is to create a dynamically linked module using the apxs tool. The second method statically links mod_dav into the Apache executable file.
Using the Terminal app, select whichever method you prefer and type one the following:
The configuration will go ahead and will locate all the necessary libraries and auxilliary files. This includes the Expat Library (XML parser), which is also found in /usr/sbin. If for some reason it cannot locate that library, you will need to force it to locate it using the following commands:./configure --with-apxs=/usr/sbin/apxsor./configure --with-apache=/usr
2. Build and Install:./configure --with-apxs=/usr/sbin/apxs --with-expat=/usr/sbin/expat
To finish the build and make the install, just use the following two commands at a Terminal prompt.
If you chose to do a dynamically loading module, then mod_dav will be installed into Apache's runtime location. If this does not work and you receive an error, take a look at the expanded documentation on the www.webdav.org site which explains what it means and what you will need to do to fix the problem.make
If you chose to link the mod_dav module statically, you will need to run the configure.style file for Apache in order to get things working using the following commands in the Terminal:
--activate-module=src/modules/dav/libdav.a3. Configure Apache.
Go find your Apache httpd.conf file in the /private/etc/httpd/ directory and open it in the Text Edit app. The modules should already be activated for you, but you might want to take quick look anyway. Look for the following lines under the DSO section of the configuration file:
Next, we need to create the Lock Database. To do this, in your Terminal, type the following:LoadModule dav_module libexec/httpd/libdav.so
Now we need to add two more lines to the httpd.conf file to make it look like what you see below. This is taken from my own Apache config file, and I've tested that it does in fact work. Enter the line below the directive that sets the location of your WebDAV DAVLockDB database, and then the line below the second directive that simply says DAV On.mkdir -p /Library/WebServer/davlocks
chmod 777 /Library/WebServer/davlocks
mkdir -p /Library/WebServer/davlocks/DAVLockDB
Save your httpd.conf file and you're basically done. I've included a few extra lines of the file to give you a context for where the two lines go. I initially had problems with the other tutorials I'd seen floating around, but maybe it was just me ;-).
4. Finish up:#
# Each directory to which Apache has access, can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
# First, we configure the "default" to be a very restrictive set of
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# This should be changed to whatever you set DocumentRoot to.
Get yourself a WebDAV client app such as Goliath (which has been ported to OS X), load up some files into your web server Documents folder and have fun.
Note that Acrobat 5, Dreamweaver 4, UltraDev 4, GoLive 5, Photoshop 6 and some other apps all support WebDAV. There's more info on how to configure Goliath at the Goliath website (http://www.webdav.org/goliath).