SabreDAV + Nginx + PUT(创建0字节文件) [英] SabreDAV + Nginx + PUT (creates 0 byte file)

查看:121
本文介绍了SabreDAV + Nginx + PUT(创建0字节文件)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使SabreDAV和Nginx正常工作,但它正在创建一个零字节文件(使用Cyber​​duck作为我的DAV客户端).文件被创建但没有内容(基本上像触摸一样)HTML前端插件可以很好地上传,因此我认为文件许可权还可以.我似乎无法弄清楚如何从SabreDAV中获取调试信息(无需修改代码)

I'm trying to get SabreDAV and Nginx to work but it is creating a ZERO byte file (using Cyberduck as my DAV client). The file gets created but no content (so basically like a touch) The HTML frontend plugin uploads fine so I think the file permissions are OK. I can't seem to figure out how to get debug info out of SabreDAV (without hacking the code)

我尝试启用http_dav_module(不确定是否相关)

I've tried enabling the http_dav_module (not really sure if this is relevant)

sudo nginx -V

configure arguments: 
--prefix=/usr/share/nginx 
--conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid --with-pcre-jit --with-debug --with-file-aio --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_realip_module --with-http_secure_link_module --with-http_stub_status_module --with-http_ssl_module --with-http_sub_module --with-http_xslt_module --with-ipv6 --with-mail --with-mail_ssl_module --add-module=/usr/src/nginx/source/nginx-1.4.2/debian/modules/nginx-auth-pam --add-module=/usr/src/nginx/source/nginx-1.4.2/debian/modules/nginx-dav-ext-module --add-module=/usr/src/nginx/source/nginx-1.4.2/debian/modules/nginx-echo --add-module=/usr/src/nginx/source/nginx-1.4.2/debian/modules/nginx-upstream-fair --add-module=/usr/src/nginx/source/nginx-1.4.2/debian/modules/nginx-syslog --add-module=/usr/src/nginx/source/nginx-1.4.2/debian/modules/nginx-cache-purge --add-module=/usr/src/nginx/source/nginx-1.4.2/debian/modules/ngx_http_pinba_module --add-module=/usr/src/nginx/source/nginx-1.4.2/debian/modules/ngx_http_substitutions_filter_module --add-module=/usr/src/nginx/source/nginx-1.4.2/debian/modules/nginx-x-rid-header --with-ld-opt=-lossp-uuid

server {
    ...
    # DAV
    client_body_temp_path       /tmp;
    dav_methods                 PUT DELETE MKCOL COPY MOVE;
    create_full_put_path        on;
    dav_access                  group:rw  all:r;
    ...
}

重启nginx

  • Github Kohana module: https://github.com/chrisgo/kohana-sabredav
  • More notes: http://forum.kohanaframework.org/discussion/11991/webdav-module#Item_9
  • How do I allow a PUT file request on Nginx server?

推荐答案

SabreDAV处理所有DAV方法.您必须完全关闭nginx的dav模块才能使其正常工作.

SabreDAV handles all the DAV methods. You must turn off nginx's dav module completely for it to work.

这篇关于SabreDAV + Nginx + PUT(创建0字节文件)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆