Apache WebDav Module

While setting up a website you can face the need to build some complicated method of viewing and updating the information on the site. There are lots of solutions - using a local copy, using a combination of HTTP and FTP tools to download the original and upload the changes etc. But also as an easy solution you can use Web-based Distributed Authoring and Versioning (WebDAV) which is available in Jelastic.

WebDAV is turning into an important tool on Apache-based servers. It was invented in order to simplify the way you update websites.

Enabling WebDAV Module for Apache Server


  1. Click Config button for the server in your environment.

  2. Navigate to conf.d folder and open modules.conf file. Make sure you have mod_dav and mod_dav_fs modules enabled in your configuration, modules.conf should have next lines uncommented:

  3. LoadModule dav_module modules/mod_dav.so
    LoadModule dav_fs_module modules/mod_dav_fs.so




  4. In the conf folder open httpd.conf file. Modify VirtualHost configuration by adding the following as it is shown in the picture below:

  5. <Directory />
    DAV on
    </Directory>



  6. Save the changes and restart Apache.

Setting Up Security Configuration


  1. Generate hash from your password. For that you can use any htpasswd tool or online service (for example, http://www.htpasswdgenerator.net/).

  2. Create simple text file with previously generated hash.

  3. Click Config button for your Apache server.

  4. Upload the created file to the webroot/ROOT folder.

  5. In the conf folder open httpd.conf file. Modify directory configurations by adding the following strings as it is shown in the picture below:

  6. AuthName "Restricted area"
    AuthType Basic
    AuthBasicProvider file
    AuthUserFile /var/www/webroot/ROOT/.htpasswd
    Require valid-user




  7. Save the changes and restart Apache.
Finally you can go to any WebDAV client. State there the host (also your credentials if you set up security configuration) and connect to the server. As a result you'll see your files and will be able to edit them, update, add some new files etc.