<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="home" title="HomePage" href="HomePage.html" />
<link rel="help" title="HowToUseWiki" href="HowToUseWiki.html" />
<link rel="copyright" title="GNU General Public License" href="http://www.gnu.org/copyleft/gpl.html#SEC1" />
<link rel="author" title="The PhpWiki Programming Team" href="http://phpwiki.org/ThePhpWikiProgrammingTeam" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Language" content="en" />
<meta name="robots" content="noindex,nofollow" />
<meta name="language" content="en" />
<meta name="document-type" content="Public" />
<meta name="document-rating" content="General" />
<meta name="generator" content="PhpWiki" />
<meta name="PHPWIKI_VERSION" content="1.3.14" />

<link rel="stylesheet" type="text/css" charset="iso-8859-1" href="phpwiki-printer.css" />
<title>PhpWiki - How to install mod_dav</title>
</head>
<body>

<div id="header">
  
<!-- Page title -->
<h1>How to install mod_dav</h1>
</div>
<div id="content">



<div class="wikitext"><span class="plugin" id="CommentPlugin246"></span><p class="tightenable top bottom"><a href="Documentation.html" class="wiki">Documentation</a> &gt; <a href="How-to%20Classification.html" class="wiki">How-to Classification</a> &gt; <a href="Apache.html" class="wiki">Apache</a> &gt; <b>How to install mod_dav</b> <br /></p>
<hr />
<h3>About this HowTo</h3>
<p class="tightenable top bottom"><b>Author:</b> <a href="mailto:laurent.dinclaux@gmail.com" target="" class="namedurl"><span style="white-space: nowrap"><img src="images/mailto.png" alt="" class="linkicon" border="0" />Laurent</span> Dinclaux</a><br />
<b>Usefull links:</b> <br /></p>
<blockquote class="tightenable top bottom"><p class="tightenable top bottom"><a href="http://www.webdav.org/" target="" class="namedurl"><span style="white-space: nowrap"><img src="images/http.png" alt="" class="linkicon" border="0" />http://www.webdav.org/</span></a> <br />
<a href="http://www.webdav.org/mod_dav/" target="" class="namedurl"><span style="white-space: nowrap"><img src="images/http.png" alt="" class="linkicon" border="0" />http://www.webdav.org/mod_dav/</span></a> <br />
<a href="http://www.mozilla.org/projects/calendar/faq.html#share" target="" class="namedurl"><span style="white-space: nowrap"><img src="images/http.png" alt="" class="linkicon" border="0" />http://www.mozilla.org/projects/calendar/faq.html#share</span></a> <br />
<a href="http://phpicalendar.sourceforge.net/nuke/index.php" target="" class="namedurl"><span style="white-space: nowrap"><img src="images/http.png" alt="" class="linkicon" border="0" />http://phpicalendar.sourceforge.net/nuke/index.php</span></a> <br /></p>
</blockquote>
<p class="tightenable top bottom"><b>Tested on:</b> SME 5.6, SME 6.0 SME Version 6.01 GPL, SME 6.5 <br />
<b>Created:</b> 31 Mar 2004 <br />
<b>License:</b> GPL <br />
<b>Summary:</b> This HowTo enable you to install webDav and enable it for specific Ibays<br />
<b>Keywords:</b> mod_dav, mozilla calendar, ical, icalendar, webdav, web dav <br />
<b>Certification:</b> Contribs.org <a href="Certification%20Process.html" class="named-wiki" title="Certification Process">in progess</a> <a href="http://forums.contribs.org/viewtopic.php?p=85530" target="" class="namedurl"><span style="white-space: nowrap"><img src="images/http.png" alt="" class="linkicon" border="0" />here</span></a> <br /></p>
<hr />
<h3>1) DOWNLOAD MOD_DAV</h3>
<p class="tightenable top">Download mod_dav rpm from <a href="http://rpmfind.net" target="" class="namedurl"><span style="white-space: nowrap"><img src="images/http.png" alt="" class="linkicon" border="0" />rpmfind.net</span></a> in a fresh directory.
<br /> <br />
<b>Note:</b> At the time of writing latest version was available from <a href="http://rpmfind.net//linux/RPM/redhat/7.3/i386/mod_dav-1.0.3-5.i386.html" target="" class="namedurl"><span style="white-space: nowrap"><img src="images/http.png" alt="" class="linkicon" border="0" />this</span> page</a>
<br /> <br /></p>
<h3>2) INSTALL MOD_DAV</h3>
<h4>Cd to the directory where you downloaded the rpms and do:</h4>
<blockquote class="mail-style-quote tightenable bottom"><p class="tightenable top bottom"><code> rpm -Uvh mod_dav-1.0.3-5.i386.rpm</code></p>
</blockquote>
<p class="tightenable top"><br />
<b>Note:</b> replace 1.0.3-5 with the rpm version you have downloaded (if different)
<br /> <br /></p>
<h3>3) SETUP APACHE</h3>
<h4>Create custom-template fragments directory:</h4>
<blockquote class="mail-style-quote tightenable"><p class="tightenable top bottom"><code> mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf</code><br /></p>
</blockquote>
<h4>Load mod_dav module:</h4>
<ul><li class="tightenable top">Open template fragment</li>
</ul>
<blockquote class="mail-style-quote tightenable"><p class="tightenable top bottom"><code> pico /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/20LoadModule80mod_dav</code><br /></p>
</blockquote>
<ul><li class="tightenable">Type that content:</li>
</ul>
<pre class="tightenable">
Loadmodule dav_module modules/libdav.so</pre>
<ul><li class="tightenable bottom">Save the file (ctrl+X)</li>
</ul>
<p class="tightenable top bottom"><br /></p>
<h4>Add mod_dav module:</h4>
<ul><li class="tightenable top">Open template fragment</li>
</ul>
<blockquote class="mail-style-quote tightenable"><p class="tightenable top bottom"><code> pico /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/30AddModule60mod_dav</code><br /></p>
</blockquote>
<ul><li class="tightenable">Type that content:</li>
</ul>
<pre class="tightenable">
Addmodule mod_dav.c</pre>
<ul><li class="tightenable bottom">Save the file (ctrl+X)</li>
</ul>
<p class="tightenable top bottom"><br /></p>
<h4>Dav lockfile:</h4>
<ul><li class="tightenable top">Open template fragment</li>
</ul>
<blockquote class="mail-style-quote tightenable"><p class="tightenable top bottom"><code> pico /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/35DavLock</code><br /></p>
</blockquote>
<ul><li class="tightenable">Type that content:</li>
</ul>
<pre class="tightenable">
&lt;IfModule mod_dav.c&gt;
    DAVLockDB /var/run/davLocks/DAVLock
&lt;/IfModule&gt;</pre>
<ul><li class="tightenable">Save the file (ctrl+X)</li>
<li class="tightenable">Create lock directory and give it the right ownership</li>
</ul>
<blockquote class="mail-style-quote tightenable bottom"><p class="tightenable top bottom"><code> mkdir /var/run/davLocks</code><br />
<code> chown www:www /var/run/davLocks</code></p>
</blockquote>
<p class="tightenable top bottom"><br /> <br /></p>
<h4>Add mod_dav to Ibays:</h4>
<ul><li class="tightenable top">Open template fragment</li>
</ul>
<blockquote class="mail-style-quote tightenable"><p class="tightenable top bottom"><code> pico /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/95AddModDav2ibays</code><br /></p>
</blockquote>
<ul><li class="tightenable">Type that content:</li>
</ul>
<pre class="tightenable">
{
        use esmith::config;
        use esmith::db;

        local %accounts;
        tie %accounts, 'esmith::config', '/home/e-smith/accounts';

        foreach my $key (grep { db_get_type(\%accounts, $_) eq 'ibay' } keys %accounts) {

                local $dav = db_get_prop(\%accounts, $key, 'ModDav') || 'disabled';

                if ($dav eq 'enabled') {
                        $OUT .= &quot;\n&lt;Directory /home/e-smith/files/ibays/$key/html&gt;\n&quot;;
                        $OUT .= &quot;    DAV        On\n&quot;;
                        $OUT .= &quot;&lt;/Directory&gt;\n&quot;;
                }

        }
}</pre>
<ul><li class="tightenable bottom">Save the file (ctrl+X) <br /></li>
</ul>
<h4>Expand template and restart Apache:</h4>
<blockquote class="mail-style-quote tightenable top bottom"><p class="tightenable top bottom"><code> /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf</code><br />
<code> /etc/e-smith/events/actions/restart-httpd-full</code><br /></p>
</blockquote>
<p class="tightenable top"><br /></p>
<h3>4) ENABLE/DISABLE DAV FOR ANY IBAY</h3>
<p class="tightenable top">mod_dav is disabled by default for all ibays</p>
<h4>ENABLING MOD_DAV</h4>
<blockquote class="mail-style-quote tightenable top bottom"><p class="tightenable top bottom"><code> /sbin/e-smith/db accounts setprop <i>IbayName</i> ModDav enabled</code><br />
<code> /sbin/e-smith/signal-event ibay-modify <i>IbayName</i> </code><br /></p>
</blockquote>
<h4>DISABLING MOD_DAV</h4>
<blockquote class="mail-style-quote tightenable top bottom"><p class="tightenable top bottom"><code> /sbin/e-smith/db accounts setprop <i>IbayName</i> ModDav disabled</code><br />
<code> /sbin/e-smith/signal-event ibay-modify <i>IbayName</i> </code></p>
</blockquote>
<p class="tightenable top bottom"><br /> <br /></p>
<h3>4) SHARING CALENDARS</h3>
<p class="tightenable top">Whith those settings, you just have to create an ibay using server-manager and enable mod_dav for it. With you client Icalendar app (Mozilla Calendar, iCal etc.), you can create and subscribe to calendars with no login and no password just using an URL such http://yourServerName/ibayName/yourCalendarFile.ics.
<br /> <br />
If you want a login/password policy, you'll have to create a directory structure (for exemple one directory per user) and create in each directory .htaccess and .htpasswd files. I have found that url: <a href="http://www.javascriptkit.com/howto/htaccess3.shtml" target="" class="namedurl"><span style="white-space: nowrap"><img src="images/http.png" alt="" class="linkicon" border="0" />http://www.javascriptkit.com/howto/htaccess3.shtml</span></a> to help you set it up. <br /> <br /> <br /></p>
<hr />
<p class="tightenable top bottom"><a href="Documentation.html" class="wiki">Documentation</a> &gt; <a href="How-to%20Classification.html" class="wiki">How-to Classification</a> &gt; <a href="Apache.html" class="wiki">Apache</a> &gt; <b>How to install mod_dav</b> <br /> <br />
<a href="How%20to%20install%20mod_dav%20feedback.html" class="named-wiki" title="How to install mod_dav feedback">Add your comments about this How To</a></p>
</div>

<div id="footer">  <hr class="printer" noshade="noshade" />
<p class="editdate">Owner: &quot;haj&quot;  Last edited on February 7, 2005  4:29 pm by &quot;haj&quot;</p>
</div>

</div>
<!-- Add your Disclaimer here -->
</body>
</html>
