Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LOCK method got 405 not allowed #50

Open
mmqmzk opened this issue Nov 7, 2019 · 0 comments
Open

LOCK method got 405 not allowed #50

mmqmzk opened this issue Nov 7, 2019 · 0 comments

Comments

@mmqmzk
Copy link

mmqmzk commented Nov 7, 2019

OS ubuntu 19.10

nginx version: nginx/1.17.5
built by gcc 8.3.0 (Ubuntu 8.3.0-6ubuntu1)
built with OpenSSL 1.1.1b  26 Feb 2019 (running with OpenSSL 1.1.1c  28 May 2019)
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-g -O2 -fdebug-prefix-map=/data/builder/debuild/nginx-1.17.5/debian/debuild-base/nginx-1.17.5=. -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie'

nginx conf

  location /webdav {
    alias /data/;
    autoindex on;

    set $dest $http_destination;
    if (-d $request_filename) {
      rewrite ^(.*[^/])$ $1/;
      set $dest $dest/;
    }
    if ($request_method ~ (MOVE|COPY)) {
      add_header 'Destination: $dest' always;
    }

    if ($request_method ~ MKCOL) {
      rewrite ^(.*[^/])$ $1/ last;
    }

    dav_methods PUT DELETE MKCOL COPY MOVE;
    dav_ext_methods PROPFIND OPTIONS LOCK UNLOCK;
    dav_access user:rw group:rw all:r;
    create_full_put_path  on;

    auth_basic "Restricted access";
    auth_basic_user_file /etc/nginx/htpasswd.conf;

    client_body_temp_path /tmp/nginx;
    client_max_body_size 0;
    client_body_timeout 36000s;
  }

I compiled the dav_ext module myself.
sudo nginx -t shows conf is ok and nginx also runs ok, other methods like PROPFIND is ok too, but still get 405 not allowed for LOCK method.

access.log

[07/Nov/2019:15:39:35 +0800] "LOCK /webdav/Download/client_id.json HTTP/2.0" 405 157 "-" "curl/7.65.3" "-"

No other error log, did I miss something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant