-
-
Save uGeek/1eb56b9af472224338e769b9b82c1b66 to your computer and use it in GitHub Desktop.
Installing nginx webdav server on ubuntu 20.04
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; | |
listen [::]:80; | |
root /var/dav/webdav_root; | |
# dav allowed method | |
dav_methods PUT DELETE MKCOL COPY MOVE; | |
# Allow current scope perform specified DAV method | |
dav_ext_methods PROPFIND OPTIONS; | |
# In this folder, newly created folder or file is to have specified permission. If n> | |
dav_access all:rw; | |
# Temporary folder | |
client_body_temp_path /var/dav/tmp; | |
# MAX size of uploaded file, 0 mean unlimited | |
client_max_body_size 0; | |
# Allow autocreate folder here if necessary | |
create_full_put_path on; | |
} |
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
# Warning: don't use this for sensitive data, there's no SSL or authentication | |
# for ubuntu 20.04 | |
# only allow access from another server with a dedicated ip | |
ufw allow from x.x.x.x | |
ufw enable | |
apt-get update | |
apt-get upgrade | |
apt-get install nginx-full | |
mkdir -p /var/dav/webdav_root | |
sudo chown -R www-data:www-data /var/dav/ | |
rm /etc/nginx/sites-available/default | |
rm /etc/nginx/sites-enabled/default | |
# copy over webdav.conf | |
nano /etc/nginx/conf.d/webdav.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment