- Published on
nginx开启webdav服务
- Authors
- Name
- JiGu
- @crypto20x
前置条件
- ubuntu 22.04
- nginx
安装nginx-webdav模块
apt install nginx libnginx-mod-http-dav-ext -y
nginx 配置
location /file {
autoindex on;
# 设置WebDAV的根目录
alias /xxxx/webdav;
# 启用WebDAV模块
dav_methods PUT DELETE MKCOL COPY MOVE;
dav_ext_methods PROPFIND OPTIONS;
#dav_access user:rw group:rw all:r;
# 设置WebDAV权限
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/password/<password_file>;