[TriLUG] mod_dav: Getting Started
Lisa C. Boyd
lisab at trilug.org
Sat Jan 17 17:19:52 EST 2004
Following the Apache Cookbook discussion yesterday, I ended up finding
out about mod_dav and Mozilla Calendar. I got it set up yesterday so I
thought it would be good to share the info with everyone here. For me
this is a dream come true - to have a calendar stored in one place that
I can access from all my computers :)
End goal: Calendar file (.ics) is stored on a web server and can be
accessed by multiple machines and updated automatically from any machine.
This is part #1. Let me know if you see any glaring errors!
Lisa B.
***mod_dav***
Main site: http://www.webdav.org/mod_dav/
The requirements for mod_dav:
"mod_dav prefers to build against Apache 1.3.6 or later, but it is
possible to use it with Apache 1.3.4. Earlier versions are not supported
at all, since it is not possible to deploy a secure DAV server unless
you use 1.3.4 (the Limit configuration directive is not available for
DAV methods in prior versions)."
1. Check to see if you have mod_dav on your web server. There are a few
ways to check this out. Here are 2 ways (I'm sure ya'll know more!):
1. telnet <server name or ip> 80
HEAD / HTTP/1.0 [return twice]
2. If you do any php, the information on what modules are loaded in
Apache can also be found in phpinfo. Your phpinfo.php file would
contain this:
<?php
phpinfo();
?>
Then you access the php file from a web browser.
If you do not have mod_dav installed:
Download the files from here:
http://www.webdav.org/mod_dav/mod_dav-1.0.3-1.3.6.tar.gz
Check here for installation and configuration info:
http://www.webdav.org/mod_dav/install.html
Next you need to create a directory to hold the documents. (The config
docs have this listed after changing apache's config file, but I've
found that you need to actually create the directory before you
reference it in apache's config file - otherwise apache won't start
again when you try to reload your config file. Maybe ya'll already know
this but it's burnt me more than once!)
mod_dav needs to have read/write access to the directory that you
create. This means that the owner and the group of the directory need to
be that of the web server (ie. User apache; Group apache). Doing this
also prohibits you from ftp'ing into that directory. This directory is
considered "private" to mod_dav and the web server.
Now you edit your config file for apache. (*For RH7.3 the config file is
here: /etc/httpd/conf/httpd.conf). Add an Alias for your directory if
you'd like (it's less typing if you do this - so I recommend it).
Alias /dav /home/lisab/www/dav/
Alias /dav/ /home/lisab/www/dav/
Then in your Location or Directory you need to specify DAV on.
<Directory "/dav">
DAV On
</Directory>
Next you need to add a DAVLockDB directive at the top-level of your
config file (outside of any <Directory> or <Location> directives). I've
specified this DB to be put into the /dav directory but I'm not sure
that mine is the most secure :) That's why I'm not going to tell you
where it's at! But the web server needs to have read/write access to the
directory that you put the DB in also (if it's different than the
directory you created before).
DAVLockDB /dav/DAVLock
That's the bare minimum that you need to do to get this up and running.
There are some other security type things that you can do as well as
timeouts and access to authorized users only.
More information about the TriLUG
mailing list