forked from tagoWorks/akod
-
Notifications
You must be signed in to change notification settings - Fork 1
Installing WebDAV
tago edited this page Apr 25, 2024
·
13 revisions
WebDAV (Web Distributed Authoring and Versioning) is an extension of the HTTP protocol that allows users to collaborate and manage files on a remote server. In this guide, you will learn how to install and set up WebDAV on Linux to create a data sharing website in order to use Flare, instead of using GitHub and Netlify.
- Open the terminal.
- Update the package list and upgrade the installed packages:
sudo apt update && sudo apt upgrade
- Install Apache using the following command:
sudo apt install apache2 -y
- Verify that Apache is installed by opening a web browser and entering your server's IP address. If you see the Apache default page, Apache is successfully installed.
- Enable the dav and dav_fs modules for Apache:
sudo a2enmod dav sudo a2enmod dav_fs
- Restart Apache to apply the changes:
sudo systemctl restart apache2.service
- Create a folder to store the data. For example, we will create a folder named 'accs':
sudo mkdir /var/www/accs
- Set the ownership of the webdav folder to the Apache user (www-data):
sudo chown www-data:www-data /var/www/accs
- Ensure that the 'accs' directory has the correct permissions for uploading and downloading files.
-
Edit the Apache configuration file for the default site:
sudo nano /etc/apache2/sites-available/000-default.conf
-
Inside the
<VirtualHost>block, add the following configuration for the webserver 'accs' directory:Alias /accs /var/www/accs <Directory /var/www/accs> DAV On <LimitExcept POST> deny from all </LimitExcept> </Directory> -
Save the changes
-
Restart Apache to apply the changes to the webserver:
sudo systemctl restart apache2.service
-
Port forward the necessary ports to publicly access your Apache webserver