Open adno opened 2 years ago
I have a similar problem. It seems that is because the HTTP server behind HTTPS reverse proxy response an HTTP Redirect to "http://xyz". Because the App use "https://xyz/zotero" but the HTTP server redirects it to "http://xyz/zotero/". If it is an Apache HTTP server, you can use: "DirectorySlash Off". e.g:
<Directory /var/www/html/webdav>
DAV On
...
DirectorySlash Off
</Directory>
Hi @labilezhu , do you maybe have an idea, how one can obtain the same effect with nginx reverse proxy? I've been faced with the same error, on my private webdav server, but with a nginx in between.
Hi @labilezhu , do you maybe have an idea, how one can obtain the same effect with nginx reverse proxy? I've been faced with the same error, on my private webdav server, but with a nginx in between.
Actually, my stack is Nginx as SSL terminator and Apache as WebDav server. My issue is the redirection from Apache. I do not use Nginx as a WebDav server. In my case, Nginx do not know a URL is a directory or not. So I can only update the configuration of Apache.
If you do want to try it in Nginx, may be the 'rewrite' can help. Just FYI, I have not try it: https://ubiq.co/tech-blog/remove-trailing-slash-in-nginx/
Oh, now I see, previously I misunderstood your configuration. Your proposed solution for nginx ends with an infinitive-loop error. So I had to change my webdav server.
If anybody meets a similar problem, I've noted that bytemark/webdav
with forced https on the reversed-proxy does not work properly with the Zoo, whereas drakkan/sftpgo
works fine.
When I try to set up webDAV, I get this:
Details:
My server requires HTTPS and redirects HTTP requests to HTTPS (which I think is the norm nowadays).
I have specified address as
https://[domain]/zotero
(https) but the error message contains just http. This is really weird.I have set up "Basic" authentication on my server, so this should not be an issue. It returns the
WWW-Authenticate: Basic realm="Password"
header and the following command works just fine and creates a directory on the server using a webDAV command:curl --basic -X MKCOL http://[user]:[pass]@[domain]/zotero/newtestdirectory
As one would expect, if you access my server's address (whether HTTP or HTTPS) without login/password it returns "401 Authorization Required"
My server works just fine in Zotero for Mac and iPhone.