Nginx新增支持WebDav模块

2020年5月26日 zhangdd 50 0 评论 linux运维

模块下载地址:https://github.com/arut/nginx-dav-ext-module 如报错找不到libxslt.so 下载地址: http://mirror.centos.org/centos/7/os/x86\_64/Packages/libxslt-1.1.28-5.el7.x86\_64.rpm 1、配置Nginx以支持WebDav: Webdav是nginx一个组件,默认编译nginx时是没有安装这个组件的。 如果跟应用公用一个nginx,需要重新编译安装nginx,重新安装前需要备份好原来的nginx.conf。 1.1编译安装 上传nginx源码nginx-1.16.1.tar.gz到/root目录下。 $ tar zxvf nginx-1.16.1.tar.gz //解压nginx源码 $ cd nginx-1.16.1 $ ./configure —prefix=/usr/local/nginx —with-http_dav_module —add-module=/soft/nginx-dav-ext-module //编译时增加web_dav模块 $ make && make install Nginx成功安装在/usr/local/nginx目录下 1.2 webdav配置 1.2.1 编辑nginx.conf $ vi /usr/local/nginx/conf/nginx.conf 在server中添加如下配置信息: 这里拿我本机的ambari 为例 location /webdav{ root  /usr/local/nginx/html; index index.html index.htm; autoindex on; ## webdav config client_body_temp_path /tmp; dav_methods PUT DELETE MKCOL COPY MOVE; create_full_put_path on; dav_access group:rw all:r; }

本文出自张佃栋de博客,转载时请注明出处及相应链接。

本文永久链接: https://blog.zhangdd.com/blog/109/

最后编辑: 2020/05/26

©著作权归作者所有