Apache WebDAV (Linux)
Noch in Bearbeitung
Installation
sudo a2enmod dav sudo a2enmod dav_fs
sudo service apache2 restart
Konfiguration
sudo mkdir /var/www/davtest/ sudo chown -R www-data:www-data /var/www/davtest/
sudo htpasswd -c /var/www/davtest/passwd.dav <user> sudo chown root:www-data /var/www/davtest/passwd.dav sudo chmod 640 /var/www/davtest/passwd.dav
cd /etc/apache2/sites-available/
sudo vi davtest.conf
<VirtualHost *:80> ServerName davtest.<domain> ServerAlias davtest.<domain> Redirect / https://davtest.<domain> </VirtualHost>
sudo vi davtest-ssl.conf
<VirtualHost *:443> ServerName davtest.<domain> ServerAlias davtest.local.<domain> DocumentRoot /var/www/davtest/data SSLEngine on SSLCertificateFile /etc/ssl/certs/davtest.crt SSLCertificateKeyFile /etc/ssl/private/apache.key <Directory /var/www/davtest/> Options Indexes MultiViews AllowOverride None Order allow,deny allow from all DAV On AuthType Basic AuthName "martin" AuthUserFile /var/www/davtest/passwd.dav Require valid-user </Directory> ErrorLog ${APACHE_LOG_DIR}/davtest.<domain>-error.log CustomLog ${APACHE_LOG_DIR}/davtest.<domain>-access.log combined </VirtualHost>
Testen
sudo apt-get install cadaver
cadaver https://davtest.<domain>
Links
https://www.techrepublic.com/article/how-to-enable-webdav-on-your-ubuntu-server/
https://httpd.apache.org/docs/2.4/mod/mod_dav.html
Zurück zu Ubuntu