Nginx新增支持WebDav模块

15 篇文章 0 订阅
1 篇文章 0 订阅

模块下载地址: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;

}

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值