Enabling WebDAV Server Support on Mac OS XAs mentioned by Apple in the various OSX marketing information, client
side WebDAV support has been added to the Mac OS X operating system. This enables seamless support for working with
information stored on DAV enabled web servers. What hasn't been mentioned very widely is that the web server shipped
with Mac OS X can also be configured as a WebDAV server out of the box with just a small amount of tweaking. This document
will describe the procedure to enable this server side support. It pertains to MacOS X Public Beta (and with some alteration, Darwin 1.02 as well).
WARNING!!! - this isn't the sort of thing you want to do without really understanding what you're doing and why you're
doing it. Unless it is properly configured, you can be opening your machine up to malicious activitity. Note that you
DO NOT need to enable your web server to be able to mount other remote web services with the Desktop.app program. Also, this covers a stock Apache web server install as provided in the Mac OS X Public Beta - it makes no attempt
to describe more advanced configurations possible with Apache. With that said, here's how to get this done.
What you need
Most of these changes will be made to the main configuration file for the Apache web server. Since Apache
is a Unix application and expects it's configuration files to have Unix line terminators (and at this point I'm not sure how the GUI text editors shipped with OS X deal with text files with Unix style line endings), I made my changes with the emacs text editor running in the Terminal application. In any case, you will need to do a couple of small Unix commands in Terminal.
- Stop the web server. To do this, open up the System Preferences application and select the Network icon. Once that control panel is loaded, select the Services tab.
Press the Off radio button located near the Web Server line and then press the Apply button.
- Open the file /Library/WebServer/Configuration/apache.conf
(note that this file is the main configuration file for the Apache web server.)
- Remove the leading # character from the line that starts with the text #LoadModule dav_module
Before you make this change, the line will look like this
#LoadModule dav_module /System/Library/Apache/Modules/libdav.so
Afterwards, it will look like this
LoadModule dav_module /System/Library/Apache/Modules/libdav.so
- Remove the leading # character from the line that looks like this
- Find the line in the apache.conf file that looks like this - <Directory "/Library/WebServer/Documents"> Right after that line, add the following text:
- On the line preceding the <Directory directive, add the following text
- Save the file.
- In the Terminal application, type in the following commands followed by <Return>
mkdir /Library/WebServer/davlocks; chmod 777 /Library/WebServer/davlocks
- Restart the web server by selecting the On radio button in the Network control panel followed by the Apply button.
- Test your newly configured WebDAV enabled server with a WebDAV enabled application (like Goliath)
While it is generally not a good practice to just toss modified copies of configuration files into use without first understanding the changes made to the files, a copy of the default apache.conf file as provided with Mac OS X with the changes outlined in this document can be found here
Last modified by Tom Bednarz on October 1,2000