Last active
February 18, 2025 23:52
-
-
Save sant123/78db5446eb5d474ea1690adbd5539725 to your computer and use it in GitHub Desktop.
Create a webdav server with nginx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Put the contents of webdav under /etc/nginx/sites-available -> /etc/nginx/sites-available/webdav | |
# In shell execute the following commands | |
sudo rm /etc/nginx/sites-enabled/default | |
sudo ln -s /etc/nginx/sites-available/webdav webdav | |
sudo systemctl restart nginx | |
# Use alias setting for sharing a directory under /webdav. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
root /var/www/html; | |
index index.html index.htm index.nginx-debian.html; | |
server_name _; | |
location /webdav { | |
alias /media; | |
client_body_temp_path /tmp; | |
dav_methods PUT DELETE MKCOL COPY MOVE; | |
dav_ext_methods PROPFIND OPTIONS; | |
dav_access user:rw group:rw all:rw; | |
create_full_put_path on; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sources:
https://kb.interspace.com/en/tech-articles/tutorials/setup-webdav-server-with-nginx-on-debian
https://www.filestash.app/2021/12/09/nginx-webdav/