In part one of the WebDav Raspberry Pi tutorial you were shown how to set up your Pi with Apache.
Apache will act as your web serving part of the PiDav solution. Next up I will show you how to setup WebDav and configure a user so that you can securely connect and save files on you WebDav server.
I used this article as a basis for this post and I’d strongly recommend you have a look at it as there are some other elements you may want to do (especially if you plan to access from Windows).
Right so now we have Apache installed you need to enable the relevant module with the following command:
sudo a2enmod dav_fs
Next up we need to enable the module:
sudo a2enmod auth_digest
So now you need to create a virtual host directory
/var/www/web1/web and then make www-data the owner of the directory you create:
sudo mkdir -p /var/www/web1/web sudo chown www-data /var/www/web1/web
Now edit the default Virtual Host file by running the following command:
sudo nano /etc/apache2/sites-available/default
Now copy the text from this file into your default site.
You will be prompted to create a password for this account. I suggest using your default pi password.
Now we need to change the permissions of the passwd.dav file so that only root and members of the www-data group can access it:
sudo chown root:www-data /var/www/web1/passwd.dav sudo chmod 640 /var/www/web1/passwd.dav
With that all done reload Apache:
sudo /etc/init.d/apache2 reload
Phew! Now all you need do is pick your favorite WebDav client and connect… Here I’m using the excellent Documents from Readdle on an iPad.
When connecting inside your next you need to type the URL as
Your username is pi and password is what you just set.
Got all that? If you got stuck or it didn’t work feel free to get in touch and I will help you if I can.