I can set it up so I can login. I can create folders too. I can’t upload
files though…well, I can’t upload files with file extensions actually,
and it’s this I find really real really bizarre. If I try and upload
blah.blah Transmit returns 405 Not Allowed and in the error logs in
Nginx I get something like “access forbidden by rule” but if I then
upload blah without the extension it works?!?! So i’m mostly getting
lots of 405 Not Allowed’s
I’m pretty sure this is an Nginx issue not a Sabredav issue.
blah.blah Transmit returns 405 Not Allowed and in the error logs in
Nginx I get something like “access forbidden by rule” but if I then
upload blah without the extension it works?!?! So i’m mostly getting
lots of 405 Not Allowed’s
Without seeing any config or knowing which extensions you refer to, I’m
going to guess that you have a location that matches those extensions
(any chance they are .php?), and that location is handling the PUT
(hence, 405 method not allowed) rather than your DAV location.
Yeh, I did think about using nginx modules, but that would require
recompiling nginx unless i’m mistaken? I’m also hoping to integrate this
with Owncloud, and that uses SabreDav, so getting that working is my
preferred option.
You have location /dav, where I expect is where you want SabreDav to
handle requests. After that you do:
include /usr/local/nginx/conf/php.conf;
include /include /usr/local/nginx/conf/staticfiles.conf;
I suspect these contain regex locations that are matching your
problematic extensions. The reason for this is that these regex
locations will take precedence over your /dav location, so when you do a
DAV request such as “PUT /dav/image.jpg”, you are really doing the PUT
to a regex location such as “~ .(jpg|png|gif)$” in staticfiles.conf or
“~ .php$” in php.conf.
The way Nginx processes requests is outlined here:
The end result of all of this is you will need to not include your
php.conf and staticfiles.conf as top-level locations. Instead you will
need to include them inside other non-regex locations.
Alternatively, you could setup a subdomain such as dav.domain.com and do
all your DAV requests via that (this is probably the most foolproof).
But it does depend on what exactly SabreDAV does, and what else is in
your included config files.
If it does work fully, it might be worth sending that information to the
SabreDAV people in case they want to include a “here is how to configure
your web server to use our application” note in their documentation
(assuming that that doesn’t already exist).