webdav基于http的私有云
可以当做磁盘挂在到系统里面
server { listen 8080; server_name 192.168.1.1; # index index.html index.htm index.php; #if ($request_method ~* GET|POST) { # return 403; # } location / { # autoindex on; client_max_body_size 5g; root /mnt/13b1d3f/www/; dav_methods PUT DELETE MKCOL COPY MOVE; client_body_temp_path /mnt/13b1d3f/tmp; dav_ext_methods PROPFIND OPTIONS; create_full_put_path on; dav_access user:rw group:rw all:r; auth_basic "user login"; auth_basic_user_file /mnt/13b1d3f/www/.htpasswd; } error_log /mnt/13b1d3f/www/dav_error.log; access_log /mnt/13b1d3f/www/dav_1.log; }
.htpasswd是存放账号密码的
格式是user:加了密的密码
openssl passwd -crypt myPassword
评论