UK WEB HOSTING FORUM FOR DISCUSSION ON WEB HOSTING SERVICE AND SUPPORT
LINUX HOSTING WINDOWS HOSTING PACKAGES SHOPPING CART OSCOMMERCE ZEN CART AGORA
ECOMMERCE HOSTING ASP MSSQL FRONTPAGE HOSTING PHP MYSQL HOSTING DISCUSSION FORUM
CPANEL RESELLER HOSTING DEDICATED SERVER VPS HOSTING PLESK VIRTUOZZO
Quick Search
Your forum announcement here!

  UK Web Hosting | Dedicated Server Windows and Linux VPS Forum > Technical Support > Linux Dedicated Servers

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 14-11-2006, 22:58
eUK-Scott's Avatar
System Administrator
 
Join Date: Oct 2006
Posts: 211
Wink Enabling WebDAV for Apache

1. What is DAV?

As presented in RFC 2291, Distributed Authoring and Versioning aims to allow tools for remote loading, editing and saving (publishing) of various media types on the WWW to interoperate with any compliant Web server.

2. What is WebDav?

As an implementation of RFC 2291 in HTTP/1.1, RFC 2518 was presented, and the implementation was named "HTTP Extensions for Distributed Authoring" OR "WEBDAV"

Assuming that the brief introduction through the RFC articles was scary enough, I will now quote the definition of WebDav as given by Martin Brown.

"Web-based Distributed Authoring and Versioning (WebDAV) uses extensions to the existing HTTP protocol to enable multiple users to manage and modify the files in a remote system. Using suitably enabled clients you can view, open, edit and save files directly into the filesystem of the Web website hosting as it were of a remote website hosting."

Which in essence means, the owner of the website hosting can store documents on a shared folder which can be updated by visitors who have adquetly equipped client softwares. This access can be controlled by imposing a login restriction to that folder. A user will not be able to create a new document, only modify and save an existing one.

3. WebDav module for Apache

My area of interest in HTTP/1.1 is Apache. WebDav is implemented in Apache through mod_dav and was developed by IETF WEBDAV Working Group. The working group presents mod_dav to the world through the page: http://www.webdav.org/mod_dav/

Now that you know all the back ground, lets move on to the next step of getting the mod_dav binary into the system.

First verify if it's precompiled into the HTTP binary or loaded into the HTTPD instance through the default HTTPD configuration of the control panel. For that do:
Quote:
httpd -l
AND
Quote:
cat /proc/$(netstat -lpn | grep :80 | awk '{print $NF}' | cut -f1 -d/)/cmdline | perl -pe 's/\0/\n/g' | grep DAV
If you see a line that says "mod_dav.c" or "-DHAVE_DAV" respectively, voila! half the work is done for you. mod_dav is loaded in RAM and ready for operation.

Now you only need to configure the individual Virtual Host to activate a shared folder. So just skip to Step 6

If you do not have dav module loaded into RAM, lets see if the binary is present in the system compiled as a DSO module. For that look for the file libdav.so in your system's Apache module directory. You can use the following command to know what your system's Apache module directory is set to:
Quote:
apxs -q LIBEXECDIR
NOTE: You need to give the full path to the APXS if it is not stored in your $PATH. In Plesk APXS is in /usr/sbin and in CPanel it is in /usr/local/apache/bin.

If you see that the binary is in your machine, skip to Step 5.

If you do not find the pre-compiled mod_dav binary, don't lose heart... you have the golden opportunity to do it yourself.

4. Installing mod_dav

mod_dav can be downloaded from http://www.webdav.org/mod_dav/mod_da...3-1.3.6.tar.gz

This can be either compiled as statically linked to Apache or as a dynamically loadable module. I went with the dynamic loading option by using the APXS tool. By default the configuration goes with this option.

So just do,
Quote:
./configure
make
make install
Now the libdav.so binary will be copied into the Apache modules directory.

5. Loading WebDav module

mod_dav is loaded into memory by using the LoadModule directive. Give a line like the one below in your httpd.conf:
Quote:
LoadModule dav_module modules/libdav.so
NOTE: Make sure you are giving the correct module directory name. The module directory in Plesk is "modules" while in CPanel it is "libexec". You have to find which one is your's as detailed in step 3.

Quoting Martin Brown:

"To make use of WebDAV you must provide the location of a lock file (using the DAVLockDB directive) which will be used to record which user has a particular file open for writing or updating and prevents multiple users from trying to write to the same file. You can also specify a timeout value; Apache will automatically remove a lock if no access occurs during this period, the client specifies the requested timeout during connection, but you can override this using the DAVMinTimeout directive."

The following two directives will suffice:
Quote:
DAVLockDB /tmp/DAVLock
DAVMinTimeout 600
6. Creating a shared folder

Now to enable a shared directory in your client's account, use the "Location" directive in httpd.conf. I'll give the steps I did, so that you can learn from example.

Quote:
mkdir /home/httpd/vhosts/XXXXXXX.com/httpdocs/webshare
chmod 775 /home/httpd/vhosts/XXXXXXX.com/httpdocs/webshare
chgrp apache /home/httpd/vhosts/XXXXXXX.com/httpdocs/webshare
htpasswd -c /home/httpd/vhosts/XXXXXXX.com/.DAVlogin
In the htpasswd command, you can set the login details to the shared folder.

NOTE: While using chgrp, I gave the group name of my web server. You should be giving your's. TO find out your web server's group, do the following command:
Quote:
grep "^Group" /etc/httpd/conf/httpd.conf
Substitute the path to config file with your system's httpd config path.

Within the virtual host definition, give the following directives:
Quote:
<Location /webshare/>
DAV On
AuthType Basic
AuthName "Editing Restricted"
AuthUserFile /home/httpd/vhosts/XXXXXXX.com/.DAVlogin
<LimitExcept GET HEAD OPTIONS>

Require user wbuser
</LimitExcept>
</Location>
The LimitExcept setting specifies that anyone trying to edit any files inside the shared folder will need to provide the login details you specified using the htpasswd command.

If you don't want any of these frills of security, omit the htpasswd command and just give the following directive:
Quote:
<Location /webshare/>
DAV On
</Location>
Restart Apache and you should be ready to roll.

7. Testing WebDav functionality

Under Windows, Windows 98, Me, 2000 and XP can all access a Web Share (the Microsoft term for a WebDAV-enabled directory). Use the Add a Network Place wizard, either through the links in the My Network Places window or through a standard File Open/Save dialog and enter the URL.

If you enabled access restriction, you will have to give a username and password. If not, you will be directly logged in.

__________________


--------------
Best Regards,
eUKScott
Business Hosting || VPS Hosting || eUKhost Knowledgebase
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 12-06-2008, 14:17
Junior Member
 
Join Date: Apr 2008
Posts: 12
Default

is this possible on a linux VPS Hosting setup??
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 12-06-2008, 15:48
eUKhost.com's Avatar
Chief Marketing Officer
 
Join Date: Sep 2005
Posts: 4,846
Send a message via AIM to eUKhost.com Send a message via MSN to eUKhost.com Send a message via Skype™ to eUKhost.com
Default

Quote:
Originally Posted by ajbird View Post
is this possible on a linux VPS Hosting setup??
Yes. This will work on a Linux VPS Hosting as well.
__________________
UK Web Hosting || Business Hosting || eUKhost Knowledgebase
Toll Free : 0808 262 0255 || MSN : mark @ eukhost.com || AIM : eukmark
A bunch of Sheep led by a Lion is better than a bunch of Lions led by a Sheep.
__________________________________________________

Great Opportunity :: Join our Affiliate Program for FREE and earn 20% commission on each referral.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 17-11-2008, 19:59
new member
 
Join Date: Sep 2007
Posts: 5
Default

what is the unix command to download a file via telnet ?

get ?

thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 17-11-2008, 21:19
eUKhost.com's Avatar
Chief Marketing Officer
 
Join Date: Sep 2005
Posts: 4,846
Send a message via AIM to eUKhost.com Send a message via MSN to eUKhost.com Send a message via Skype™ to eUKhost.com
Default

Quote:
Originally Posted by matomoto View Post
what is the unix command to download a file via telnet ?

get ?

thanks
wget if you are directly connected through SSH. mget if you connect on FTP port through SSH
__________________
UK Web Hosting || Business Hosting || eUKhost Knowledgebase
Toll Free : 0808 262 0255 || MSN : mark @ eukhost.com || AIM : eukmark
A bunch of Sheep led by a Lion is better than a bunch of Lions led by a Sheep.
__________________________________________________

Great Opportunity :: Join our Affiliate Program for FREE and earn 20% commission on each referral.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 10:08.

 

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by Web Hosting 3.1.0
Copyright © 2001-2008, eUKhost.com. All rights reserved.

 
Site Map

VPS Hosting
VPS Hosting plans

Dedicated Server Hosting
Dedicated Server plans

Business Web Hosting
100% uptime Hosting

Cpanel Hosting
cPanel Shared Hosting

Reseller Hosting
Reseller Web Hosting

Windows Hosting
Windows Shared Hosting

Windows VPS

Windows VPS Hosting

Semi Dedicated Servers
Semi-Dedicated Hosting

Dedicated Server Mirroring
Dedicated Server Mirroring

Webhosting Knowledgebase
Frequently asked Questions

Web Hosting Blog
eUKhost Blog

Web Hosting Support
Support Helpdesk

UK Data Center
eUKhost Datacenter

Web Hosting Forum
eUKhost Forum

Support Tutorials
Online Flash Tutorials

Offsite Back-up Plans
Remote Backup Service

Customer Testimonials
eUK Customer Testimonials


knowledgebase articles

eUKhost.com Services

Pre-Sales Questions
Pre-sales FAQ's

Domain Names
Domain registration FAQ's

cPanel Hosting
cPanel Hosting FAQ's

Windows Web Hosting
Plesk Control Panel

Reseller Hosting
Reseller Hosting FAQ's

VPS Hosting
Virtual Private Server

Semi-Dedicated Servers
Semi-Dedicated FAQ's

Dedicated Servers
Dedicated Server Hosting


popular blog categories


Web Hosting
Website Hosting articles

UK Web Hosting
UK Hosting articles

Dedicated Server Hosting
Dedicated Server guidelines

VPS Hosting
VPS hosting articles

cPanel Hosting
cPanel Hosting articles

Linux Operating System
Linux Operating techniques

Windows Web Hosting
Windows plesk articles

Web Hosting
Web Hosting Service