View Single Post
  #1  
Old 12th January 2010, 17:33
smartin smartin is offline
Member
 
Join Date: Dec 2007
Posts: 82
Thanks: 3
Thanked 0 Times in 0 Posts
Default Newb: Is this WebDav setup going to work?

Hi,

I have an ISPc3 setup working well and I'm petrified of breaking anything so just wanted someone to sanity-check the following... I really have no idea what I'm doing.

I notice there is a lot of interest in webdav as related to ISP3 so perhaps this can become a howto in the end...

I'm assuming the following:

I'm running ISP3 on Ubuntu 8.04 LTS server.
My site is called 'www.mysite.com'. It's already created using ISPc3.
I want to create a dav folder for the client 'Mike' within my website.

Does the following make sense...?

Become root:
Code:
sudo su
Enable the WebDav modules:
Code:
a2enmod
dav (enter)
a2enmod
dav_fs (enter)
Reload apache
Code:
/etc/init.d/apache2 force-reload
Create a dav folder for 'Mike': (The exact location may be different for you)
Code:
mkdir /var/www/clients/client4/www.mysite.com/web/clients/dav/mike
Only allow root and www-data group members to access. Then set permissions:
Code:
chgrp root:www-data /var/www/clients/client4/www.mysite.com/web/clients/dav/mike
chmod 640 /var/www/clients/client4/www.mysite.com/web/clients/dav/mike

Create the htpasswd file and add the user 'mike'. The -c flag creates the file if it doesn't already exist. *Only* use it the first time. You will be asked for the password you wish 'mike' to use.
Code:
htpasswd -c /var/www/clients/client4/www.mysite.com/web/clients/dav/mike/.DAVlogin mike
I then go to my ISPc3 control panel and log in.
I go to the 'Sites' tab
Click on 'www.mysite.com'
Go to 'Options'

In the 'Apache Directives' field I paste in:
Code:
DAVLockDB /tmp/DAVLock
#DAVMinTimeout 600

<Location /clients/client4/www.mysite.com/web/clients/dav/mike/>
        Dav On

        AuthType Basic
        AuthName mike
        AuthUserFile /var/www/clients/client4/www.mysite.com/web/clients/dav/mike/.DAVlogin

        <LimitExcept OPTIONS>
                Require user mike
        </LimitExcept>
</Location>
Save and log out of ISPc3

Restart apache
Code:
/etc/init.d/apache2 restart
I more or less have to repeat this whole thing for each WebDav user I want to create.

Is this going to work?

Is there a more elegant way, especially given that I will need to create further password protected Dav folders for other users?

Thanks guys! :-)

S

Last edited by smartin; 12th January 2010 at 18:06.
Reply With Quote
Sponsored Links