Documentation > How-to Classification > Apache > How to install mod_dav on SME 7.x
About this HowTo
Release: A1.01
Author: Peter Walter
Credits: Based on a previous HOWTO for 6.x by Laurent Dinclaux.
Updated 7/22/06 by Michael McCarn to prevent line-wrapping in 95AddModDav2ibays and to clarify the Enable & Disable processes
Useful links:
http://www.webdav.org/
http://www.webdav.org/mod_dav/
HomePage.html/How%20to%20install%20mod_dav
- Tested on: SME 7.0 RC1
Created: 9 April 2006
License: GPL
Summary: This document describes how to enable webdav for specific ibays on SME 7.x
Keywords: mod_dav, webdav, web dav
- Warning*
This is an alpha release. These instructions currently create a public ibay readable and writeable by anyone. Use at your own risk. Over time, these instructions will be updated to include instructions for securing the ibay. Feel free to update the wiki if you figure it out before I do.
1) Setup Apache 2.x
Create a custom-template fragments directory:
mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
Load mod_dav module:
- Open a template fragment
pico /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/20LoadModule80mod_dav
- Type the content:
LoadModule dav_module modules/mod_dav.so LoadModule dav_fs_module modules/mod_dav_fs.so
- Save the file (ctrl+X)
Dav lockfile:
- Open a template fragment
pico /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/35DavLock
- Type the content:
DAVLockDB /var/run/davLocks/DAVLock
- Save the file (ctrl+X)
- Create the lock directory and give it the right ownership
mkdir /var/run/davLocks
chown www:www /var/run/davLocks
Add mod_dav to ibays:
- Open a template fragment
pico -w /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/95AddModDav2ibays
- Type the content:
{ use esmith::AccountsDB; my $adb = esmith::AccountsDB->open_ro(); $OUT = ""; foreach my $ibay ($adb->ibays) { my %properties = $ibay->props; my $key = $ibay->key; if ($properties{'ModDav'}) { if ($properties{'ModDav'} eq 'enabled') { $OUT .= "\n<Directory /home/e-smith/files/ibays/$key/html>\n"; $OUT .= " DAV On\n"; $OUT .= "</Directory>\n"; } } } }
- Save the file (ctrl+X)
Expand the template and restart Apache:
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
/etc/rc7.d/S86httpd-e-smith restart
2) Create or Configure an Ibay
Create or configure the target ibay as folllows:
User access via file sharing or user ftp write=group, read=group
Public access via web or anonymous ftp entire internet, no password required
Execution of dynamic content disabled
3) Enable / Disable MOD_DAV for any ibay
mod_dav is disabled by default for all ibays
Enabling MOD_DAV
/sbin/e-smith/db accounts setprop IbayName ModDav enabled
/sbin/e-smith/signal-event ibay-modify IbayName
Disabling MOD_DAV
/sbin/e-smith/db accounts setprop IbayName ModDav disabled
/sbin/e-smith/signal-event ibay-modify IbayName
Note: Replace IbayName with the name of the target ibay you created (or configured) in step 2.
Documentation > How-to Classification > Apache > How to install mod_dav on SME 7.x
Add your comments about this How To