You want to enable WebDAV capabilities on your existing Apache 1.3 server with mod_dav.
Apache 2.0 includes mod_dav as a standard module, so you do not need to download and build it.
Download and unpack the mod_dav Windows package from http://webdav.org/mod_dav/win32/. Verify that your Apache installation already has the xmlparse.dll and xmltok.dll files in the ServerRoot directory; if they aren't there, check through the Apache directories to locate and copy them to the ServerRoot. mod_dav requires the Expat package, which is included with versions of the Apache web server after 1.3.9; these files hook into Expat, which mod_dav will use.
Put the mod_dav DLL file into the directory where Apache keeps its modules:
C:\>cd mod_dav-1.0.3-dev C:\mod_dav-1.0.3-dev>copy mod_dav.dll C:\Apache\modules C:\mod_dav-1.0.3-dev>cd \Apache
Add the following lines to your httpd.conf file:
LoadModule dav_module modules/mod_dav.dll
You may also need to add an AddModule line if your httpd.conf file includes a ClearModuleList directive and re-adds the other modules. Alternatively, you can insert the LoadModule for mod_dav after the ClearModuleList directive.
mod_dav is an encapsulated and well-behaved module that is easily built and added to an existing server. To test that it has been properly installed, you need to enable some location on the server for WebDAV management and verify access to that location with some WebDAV-capable tool, or browse to it in Windows Explorer, which knows how to access WebDAV locations (as of Windows 2000), or access it from a different system where cadaver or another WebDAV tool is available.
To enable your server for WebDAV operations, you need to add at least two directives to your ServerRoot/conf/httpd.conf file. The first identifies the location of the locking database used by mod_dav to keep WebDAV operations from interfering with each other; it needs to be in a directory that is writable by the server. For example:
Now add the following lines to your httpd.conf file to enable WebDAV:
<IfModule mod_dav.c> DAVLockDB "C:/Apache-1.3/var/dav-lock" </IfModule>
Create a temporary directory for testing mod_dav's ability to function:
Modify the <IfModule> container to enable WebDAV operations for this test directory:
<IfModule mod_dav.c> DAVLockDB "C:/Apache-1.3/var/dav-lock" <Directory "C:/Apache-1.3/htdocs/dav-test"> DAV On </Directory> </IfModule>
Now restart your server and try accessing the /dav-test location with a WebDAV client. If you're using cadaver from another system, see Recipe 2.2for detailed instructions. If you want to use Windows Explorer to test mod_dav, read the following section.
Using Windows Explorer to test mod_dav
After enabling the htdocs\dav-test directory for WebDAV operations and restarting your server, start up Windows Explorer. Follow the steps below to access the directory using WebDAV. This can be done on the local system or on another Windows system that can access your server system.
Congratulations! The file was uploaded to your web server using WebDAV.
After your testing is complete, don't forget to remove the htdocs\dav-test directory and the <Directory "C:/Apache-1.3/htdocs/dav-test"> stanza in your configuration file, or else anyone can upload files to your server.