Frequently Asked Question

How to Create users
Last Updated 4 years ago

Step 1: Load Apache2 utils
sudo apt-get install apache2-utils

Step 2: Create user accounts
****Please take note there are two ways to create users, either by Basic (No encryption) or Digest (encryption)

Digest user creation:
First User: sudo htdigest -c /etc/apache2/users.password webdav alex
Further user creations: sudo htdigest /etc/apache2/users.password webdav jaco

Basic User creations:
First User: sudo htpasswd -c /etc/apache2/users.password webdav alex
Further User creations: sudo htpasswd /etc/apache2/users.password webdav jaco


Step 3: Change Rights
sudo chown root:www-data /etc/apache2/users.password
sudo chmod 640 /etc/apache2/users.password


After the password file is created, we should make changes to the configuration at /etc/apache2/sites-available/000-default.conf.

Example of file for Digest user creations:
DavLockDB /var/www/DavLock


ServerAdmin webmaster@localhost
DocumentRoot /var/www/html

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /webdav /var/www/webdav


DAV On
AuthType Digest
AuthName "webdav"
AuthUserFile /etc/apache2/users.password
Require valid-user



Example of file for Basic user creations:
DavLockDB /var/www/DavLock


ServerAdmin webmaster@localhost
DocumentRoot /var/www/html

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /webdav /var/www/webdav


DAV On
AuthType Basic
AuthName "webdav"
AuthUserFile /etc/apache2/users.password
Require valid-user



Enable Digest add-on and restart service
sudo a2enmod auth_digest
sudo service apache2 restart

Please Wait!

Please wait... it will take a second!