Apache WebDav Module

Apache WebDAV Module

Web-based Distributed Authoring and Versioning (WebDAV) provides a simple way to view, edit, upload, and manage website files remotely. On Apache-based environments, the required WebDAV modules are already loaded, so only the server and security configuration must be added.

WebDAV Overview

WebDAV extends HTTP with remote file-authoring capabilities. It can replace workflows that require a local website copy or separate HTTP and FTP tools for downloading and uploading modified files.

Remote viewingBrowse the website files through a compatible WebDAV client.
File editingOpen and update existing website files remotely.
File managementAdd new files and upload modified content to the server.
HTTP-based accessUse WebDAV without maintaining a separate FTP workflow.

Enable WebDAV for Apache

1

Open Apache configuration

Locate the Apache server in the environment and click Config.

2

Edit httpd.conf

Open /etc/httpd/conf/httpd.conf. The required mod_dav and mod_dav_fs modules are loaded by default.

3

Enable WebDAV in the VirtualHost configuration

Add the following directory configuration:

<Directory />
  DAV on
</Directory>
Enable the Apache WebDAV module
Enable WebDAV by adding the DAV directive to the Apache VirtualHost configuration.
4

Save and restart Apache

Save the updated configuration and restart the Apache server.

Configure WebDAV Authentication

1

Generate a password hash

Use an htpasswd tool to generate a username and password hash.

2

Create the password file

Create a text file containing the generated authentication entry.

3

Upload the file

Click Config beside the Apache server and upload the file to /var/www/webroot/ROOT.

4

Add authentication directives

Open /etc/httpd/conf/httpd.conf and add the following settings to the relevant directory configuration:

AuthName "Restricted area"
AuthType Basic
AuthBasicProvider file
AuthUserFile /var/www/webroot/ROOT/.htpasswd
Require valid-user
Apache WebDAV security configuration
Protect WebDAV access with Apache Basic authentication.
5

Save and restart Apache

Save the authentication configuration and restart the Apache server.

!

Use HTTPS for credentials

Basic authentication sends encoded credentials with each request. Enable SSL/TLS so the username and password are encrypted while travelling between the WebDAV client and the server.

Connect through a WebDAV Client

Open a compatible WebDAV client and provide the environment host. When authentication is configured, also enter the username and password stored in the uploaded password file.

  • Enter the Apache environment URL or custom domain as the host.
  • Provide the configured WebDAV credentials.
  • Connect to the server.
  • Browse, edit, update, and add website files through the client.

Test safely

Before editing production content, test the WebDAV connection with a temporary file and confirm that file permissions and authentication behave as expected.

Expected Result

The Apache environment accepts WebDAV connections. After connecting with a compatible client, authorized users can view, modify, upload, and add website files remotely.

Important Notes

  • The mod_dav and mod_dav_fs modules are loaded by default.
  • Restart Apache after changing httpd.conf.
  • Store the password file outside publicly downloadable application content whenever the deployment structure allows it.
  • Use SSL/TLS with Basic authentication.
  • Limit WebDAV access to trusted users and required directories.
  • Back up website files before enabling remote editing for production content.

Common Issues and Solutions

WebDAV client cannot connectCheck the environment host, Apache status, DAV directive, SSL settings, and network connectivity.
Authentication is rejectedVerify the username entry, password hash, AuthUserFile path, and Apache restart.
Files are visible but cannot be editedReview Apache and filesystem permissions for the target directory.
Apache fails to restartValidate the syntax and placement of the Directory and authentication directives.
Credentials are exposed over the networkEnable HTTPS and connect through the secure WebDAV URL.