On Saturday 01 Mar 2014 11:13:40 Peter Humphrey wrote: > On Friday 28 Feb 2014 16:31:39 Nilesh Govindrajan wrote: > > You don't need moddav for owncloud. Owncloud implements it via php. > > Now I am confused. Do I need to add or remove a USE flag from php or > owncloud?
I can't advise on owncloud, because I hadn't heard of it until now. In a
vanilla apache installation you would need to do the following:
1. Set up the dav, dav_fs, dav_lock USE flags in apache, remerge it and
restart it.
2. Check that /etc/apache2/httpd.conf shows:
<IfDefine DAV>
LoadModule dav_module modules/mod_dav.so
</IfDefine>
<IfDefine DAV>
LoadModule dav_fs_module modules/mod_dav_fs.so
</IfDefine>
<IfDefine DAV>
LoadModule dav_lock_module modules/mod_dav_lock.so
</IfDefine>
3. Set up your vhost fs to enable webdav access to it:
<VirtualHost *:80>
ServerName example.com
ServerAlias my_example.com
DocumentRoot /var/www/dev.example.com/htdocs
<Location />
Dav On
AuthType Basic
AuthUserFile /var/www/.basic_password
AuthName "My WebDav Site - Admin Access Only!"
Require user My_User
</Location>
</VirtualHost>
4. Configure your corresponding modules.d vhost file:
<Directory "/var/www/dev.example.com/htdocs">
Options FollowSymlinks
AllowOverride All
Order deny,allow
Allow from all
</Directory>
5. Configure the installed webdav module file. I don't know what are the
defaults but this is what I have in my /etc/apache2/modules.d/45_mod_dav.conf:
<IfDefine DAV>
DavLockDB "/var/lib/dav/lockdb"
# The following directives disable redirects on non-GET requests for
# a directory that does not include the trailing slash. This fixes a
# problem with several clients that do not appropriately handle
# redirects for folders with DAV methods.
<IfModule setenvif_module>
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-
carefully
BrowserMatch "MS FrontPage" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[012345678]" redirect-carefully
BrowserMatch "^gnome-vfs/1.0" redirect-carefully
BrowserMatch "^XML Spy" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
</IfModule>
</IfDefine>
6. Set up /etc/conf.d/apache2 to start the DAV option. In mine I have both '-
D DAV' and '-D DAV_FS', but I don't know if apache-2.4 needs the latter to be
explicitly started by apachectl or if it is loaded by the DAV module.
Restart apache and you should be able to access the fs from a browser, with
username 'My_User' and whatever password you have created with htpasswd. If
you don't trust the network and therefore you don't want to be sending
credentials in the clear, enable SSL.
I hope I haven't missed anything important here. Have a look at the online
apache documentation for more advanced settings, if you want to lock down what
webdav will allow, otherwise keep an eye on your apache logs to see if there
are any errors.
HTH.
--
Regards,
Mick
signature.asc
Description: This is a digitally signed message part.

