Skip to content

Instantly share code, notes, and snippets.

@artizirk
Created February 15, 2019 15:12
Show Gist options
  • Save artizirk/2002fd51b0ce86ea59e3a41464cbdca4 to your computer and use it in GitHub Desktop.
Save artizirk/2002fd51b0ce86ea59e3a41464cbdca4 to your computer and use it in GitHub Desktop.
Minimal nginx webdav server
worker_processes 1;
error_log stderr;
daemon off;
pid /tmp/nginx/nginx.pid;
load_module /usr/lib/nginx/modules/ngx_http_dav_ext_module.so;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
client_body_temp_path /tmp/nginx;
fastcgi_temp_path /tmp/nginx;
uwsgi_temp_path /tmp/nginx;
scgi_temp_path /tmp/nginx;
keepalive_timeout 65;
types_hash_max_size 4096;
access_log /dev/stdout;
server {
listen 8080;
root ./;
autoindex on;
#auth_basic "login prompt";
#auth_basic_user_file ./passwd;
location / {
}
location /dav {
dav_methods PUT DELETE MKCOL COPY MOVE;
dav_ext_methods PROPFIND OPTIONS;
# Adjust as desired:
dav_access user:rw group:rw all:r;
client_max_body_size 0;
create_full_put_path on;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment