Welcome! Log In Create A New Profile

Advanced

Re: nginx + SabreDAV: Error 405 when accessing location via WebDAV, SabreDAV web interface works without problems

Francis Daly
March 14, 2015 06:10AM
On Fri, Mar 13, 2015 at 01:23:12PM +0100, Sebastian Schwaiger wrote:

Hi there,

> I'm trying to set up a WebDAV server using SabreDAV.

I don't see an obvious sample configuration for this for nginx,
but the sabredav docs do give a sample configuration for apache at
http://sabre.io/dav/webservers/, which seems to indicate that *all*
requests should be handled by sabredav; so whatever web server is used
is really just there to let sabredav do its work.

That is not what the configuration you show here does; so I suspect there
may need to be some more discussion about what exactly you want nginx
to do.

I would expect that for nginx, if every request that starts with "/s/"
should be passed to the fastcgi server to be processed by the file
/opt/sabredav/server.php, then all the configuration you need is

server {
location ^~ /s/ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /opt/sabredav/server.php;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
}

That will let requests that do not start with /s/ be served from the
filesystem at /usr/local/nginx/html, or whatever your configured root is.

> location /TENANT_ID/webdav/ {
>
> try_files $uri $uri/
> /TENANT_ID/webdav/index.php?$1;

$1 there probably does not have what you want.

And the try_files there will probably be what leads to the 405 that you see...

> 2015/03/13 12:06:44 [debug] 111#0: *513 http request line: "PROPFIND
> /TENANT_ID/webdav/ HTTP/1.0"

....because the request is for /TENANT_ID/webdav/, which refers to a
directory that exists, and the nginx serve-from-the-filesystem handler
does not "do" PROPFIND.

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx + SabreDAV: Error 405 when accessing location via WebDAV, SabreDAV web interface works without problems

Sebastian Schwaiger March 13, 2015 08:32AM

Re: nginx + SabreDAV: Error 405 when accessing location via WebDAV, SabreDAV web interface works without problems

Francis Daly March 14, 2015 06:10AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 343
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready