Call Us! 1-800-383-5193
Call Us! 1-800-383-5193
Call Us! 1-800-383-5193

Need Help?

Emergency Response Time custom

Our experts have had an average response time of 11.06 minutes in March 2021 to fix urgent issues.

We will keep your servers stable, secure and fast at all times for one fixed price.

Enabling WebDAV for Apache

by | Mar 24, 2006

Recently I had the opportunity to enable WebDav for an account in a Plesk 5.5 server that my team maintained. The machine was a RedHat 7.3 server on which ran Apache 1.3.27. The following article is a documentation of the questions I asked myself regarding WebDav.

I principally depended on the article by Martin Brown published in for the implementation. I highly recommended going through this article.

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 site as it were of a remote website.”

Which in essence means, the owner of the website 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.

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:

httpd -l


cat /proc/$(netstat -lpn | grep :80 |
awk '{print $NF}' |
cut -f1 -d/)/cmdline | perl -pe 's//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 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:


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

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,

make install

Now the 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:

   LoadModule dav_module modules/

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:

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.

mkdir /home/httpd/vhosts/
chmod 775 /home/httpd/vhosts/
chgrp apache /home/httpd/vhosts/
htpasswd -c /home/httpd/vhosts/

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:

 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, I gave the following directives:

<Location /webshare/>
    DAV On
    AuthType Basic
    AuthName "Editing Restricted"
    AuthUserFile /home/httpd/vhosts/
    <LimitExcept GET HEAD OPTIONS>

        Require user wbuser

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:

<Location /webshare/>

Restart Apache and you should be ready to roll.

7. Testing WebDav functionality

Quoting Martin Brown:

“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.

Articles by Visakh About the author:
Visakh S. Nair works as Engineer in Bobcares. He is a graduate in Computer Science and specialises in Plesk server administration.


Privacy Preference Center


Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]


Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid


Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie


These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.