Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
May 21, 2012, 03:29:52 AM

Pages: [1]   Go Down
  Print  
Author Topic: Is there an easy way or a good guide to getting webDAV set up?  (Read 2343 times)
weaintsayin
Trekkie
**
Offline Offline

Posts: 19


« on: July 11, 2008, 09:20:53 AM »

On a VPS box at LunarPages?

I would like a small webDAV area on one of my servers, what is the best way to set this up?

Help appreciated.
Logged
perestrelka
Administrator
Master Jedi
*****
Offline Offline

Posts: 1395



« Reply #1 on: July 11, 2008, 09:26:19 PM »

Hello,

Do you use Linux or Windows VPS? Do you have a control panel installed as well?

Logged

Kind Regards,
Vlad Artamonov
weaintsayin
Trekkie
**
Offline Offline

Posts: 19


« Reply #2 on: July 12, 2008, 08:48:22 AM »

Sorry, should have been specific.

Linux/Apache box with Plesk 8.something.

I presume I can specify a small area of one of the virtual servers as webDav?

Logged
perestrelka
Administrator
Master Jedi
*****
Offline Offline

Posts: 1395



« Reply #3 on: July 16, 2008, 11:16:53 PM »

Sorry, should have been specific.

Linux/Apache box with Plesk 8.something.

I presume I can specify a small area of one of the virtual servers as webDav?



That's right. Here are example steps to activate WebDAV on linux server with Plesk I found somewhere in Internet:

===============================================================================
You can put the following in a vhost.conf, or put it in dav.conf and include dav.conf from your vhost.conf file. These would both go in the conf directory of your site.

- To create a read-only Dav directory, use the following. Substitute the correct paths for <vhosts>, <domain_name> and <dav_dir>.

<Directory "/var/www/vhosts/<domain_name>/httpdocs/<dav_dir>">
DAV on
AllowOverride None
<Limit HEAD GET POST OPTIONS PROPFIND>
Allow from all
</Limit>
<Limit MKCOL PUT DELETE LOCK UNLOCK COPY MOVE PROPPATCH>
Deny from all
</Limit>
</Directory>

You can then mount the directory using http://<domain_name>/<dav_dir>

- To create a dav directory that is read/write and password protected, you have a couple of ways to go about it.

1) Using Plesk, create a password protected directory. Then, add something like the following to the .conf file:

<Directory "/var/www/vhosts/<domain_name>/httpdocs/<protected_dir>">
DAV on
AllowOverride none
</Directory>

The usual plesk mechanism will be in charge of authenticating.

Or, you can just do:
<Directory "/var/www/vhosts/<domain_name>/httpdocs/<any_dir>">
DAV on
</Directory>

and then use .htaccess type authentication by putting it in the .htaccess file of the directory.

Do not create an unprotected read/write directory, or you will open your server up to all kinds of hacking.

After all of this, have plesk to regenerate apache configs:

websrvmng -v -a

and then restart Apache using something like:

service httpd restart
===============================================================================

I hope this helps.
« Last Edit: July 19, 2008, 09:48:04 PM by perestrelka » Logged

Kind Regards,
Vlad Artamonov
weaintsayin
Trekkie
**
Offline Offline

Posts: 19


« Reply #4 on: July 18, 2008, 08:05:53 AM »

Thanks, there was one more step (for others finding this):

Set 777 permissions on the webdav directory (for read/write).

I also can't get this to work on https, only http. It seems that https for webDav is a little more complicated and I can't see myself solving it.

It doesn't just work if you put the folder in the httpsdocs folder.


Logged
perestrelka
Administrator
Master Jedi
*****
Offline Offline

Posts: 1395



« Reply #5 on: July 19, 2008, 01:44:03 AM »

Thanks, there was one more step (for others finding this):

Set 777 permissions on the webdav directory (for read/write).

I also can't get this to work on https, only http. It seems that https for webDav is a little more complicated and I can't see myself solving it.

It doesn't just work if you put the folder in the httpsdocs folder.


What url are you using to connect to and what error are you getting in the apache logs when you are trying to use httpsdocs folder?

Logged

Kind Regards,
Vlad Artamonov
weaintsayin
Trekkie
**
Offline Offline

Posts: 19


« Reply #6 on: July 19, 2008, 07:35:05 PM »

I'm trying to connect to

https://myserver.com/omnidav

In the ssl Access log I get one line:
69.x.x.x - - [19/Jul/2008:19:22:32 -0700] "OPTIONS /omnidav/ HTTP/1.1" 200 1305 "-" "WebDAVFS/1.7 (01708000) Darwin/9.4.0 (i386)"

There's nothing in the error.log

My Mac fails and puts the following in it's log:
7/19/08 10:22:32 PM webdavfs_agent[1775] network_mount: WebDAV protocol not supported; file: /SourceCache/webdavfs/webdavfs-252.6/mount.tproj/webdav_network.c; line: 2835

If I try:

http://myserver.com/omnidav

In the access log on the server I get many lines, the first few:
69.x.x.x - member005 [19/Jul/2008:05:56:27 -0700] "PROPFIND /omnidav/ HTTP/1.1" 207 733 "-" "WebDAVFS/1.7 (01708000) Darwin/9.4.0 (i386)"
69.x.x.x - - [19/Jul/2008:19:23:14 -0700] "OPTIONS /omnidav/ HTTP/1.1" 401 859 "-" "WebDAVFS/1.7 (01708000) Darwin/9.4.0 (i386)"
69.x.x.x - member005 [19/Jul/2008:19:23:23 -0700] "OPTIONS /omnidav/ HTTP/1.1" 200 319 "-" "WebDAVFS/1.7 (01708000) Darwin/9.4.0 (i386)"

My Mac puts the following in its log:
7/19/08 10:23:20 PM webdavfs_agent[1785] WebDAV FS authentication credentials are being sent insecurely to: http://myseverver.com/omnidav/
7/19/08 10:23:23 PM webdavfs_agent[1785] mounting as authenticated user

I've tried using both Mac finder and Cyberduck as the client. Cyberduck appears to go through a connection cycle but then just ends up being not connected. The only difference between a connection that works and one that doesn't is http: or https:


Logged
perestrelka
Administrator
Master Jedi
*****
Offline Offline

Posts: 1395



« Reply #7 on: July 19, 2008, 09:53:53 PM »


It is hard to say for sure, but as per the logs of connection via https, it appears to me DAV does not get activated for https. It is required to review apache configs for the both https and http hosts to investigate further.
Logged

Kind Regards,
Vlad Artamonov
weaintsayin
Trekkie
**
Offline Offline

Posts: 19


« Reply #8 on: July 20, 2008, 05:19:59 AM »

This is what I have in the vhost.conf file for the domain.

# Added 18/07/2008 Member005 - WebDav
<Directory "/var/www/vhosts/myhost.com/httpsdocs/omnidav">
DAV on
AllowOverride none
</Directory>

# Added 18/07/2008 Member005 - WebDav
<Directory "/var/www/vhosts/myhost.com/httpdocs/omnidav">
DAV on
AllowOverride none
</Directory>

I actually have the root of the whole server set as password protected via the control panel.
Logged
perestrelka
Administrator
Master Jedi
*****
Offline Offline

Posts: 1395



« Reply #9 on: July 22, 2008, 10:07:27 PM »


Hm.. The config looks good to me. Can you please provide the exact content of domain's *.conf files in private message to me and I'll be glad to look into this further.
Logged

Kind Regards,
Vlad Artamonov
Pages: [1]   Go Up
  Print  
 
Jump to: