Webdav on Ubuntu
By using Nginx:
Create folder
sudo chown -R www-data:www-data /path/to/your/webdav/folder
sudo chmod -R 775 /path/to/your/webdav/folder
Set password
sudo apt install apache2-utils
sudo htpasswd -c /etc/nginx/webdav.passwords your_username
Nginx Config
server {
listen 80;
server_name example.com;
location /webdav {
alias /home/ubuntu/webdav;
dav_methods PUT DELETE MKCOL COPY MOVE;
dav_ext_methods PROPFIND OPTIONS;
create_full_put_path on;
dav_access group:rw all:r;
autoindex on;
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/webdav.passwords;
}
}
sudo systemctl reload nginx