WebDAV not working with nginx in front of Seafile Pro Docker Setup

Hi Forum,

I’m hosting Seafile Pro 7.1.3 with the docker-compose setup, and as there are some more services on the server, the I have nginx as reverse proxy in front of the docker-compose setup.

I didn’t touch the configs of the docker setup, except enabling WebDAV by doing some changes in the seafdav.conf which already exists in the docker setup:

enabled = true
port = 8080
fastcgi = true
share_name = /seafdav

Seahub, the desktop clients and the Android app are working, but WebDAV doesn’t. When I open my[dot]example[dot]com/seafdav, it loads for some time, and then the nginx which is included in the seafile container just responds with “502 Bad Gateway”. I can see that the response comes from the nginx in the seafile container, because the nginx inside the Seafile container is 1.14.0 and my fronting proxy is 1.14.2 (the version is written in the error message in the browser).

The seafdav.error.log of the nginx inside the Seafile container shows this error for each request:

2020/04/26 18:07:17 [error] 44#44: *97 upstream prematurely closed connection while reading response header from upstream, client:, server: my.example.com, request: "GET /seafdav HTTP/1.0", upstream: "fastcgi://", host: "my.example.com" is the local IP of my front reverse proxy.

I restarted the docker-compose setup, the whole server, and also tried “seafile.sh restart” inside the docker container, to be sure it loads the new seafdav.conf file. When I restart seafile inside the docker container, it also logs to the output, that it loads the seafdav.conf:

seafile-controller.c(979): loading seafdav config from /opt/seafile/conf/seafdav.conf

I’m out of ideas. Why is WebDAV unreachable? What else can I try?

1 Like

Are you aware of that?

Search for the the Proxy Seafdav section. What is saying the controller log? Not able to create the pid?

1 Like

Wow, thanks @jobenvil! That solved it.

For the record, if someone else stumbles upon that: I just copied the location /seafdav settings from the 7.1 upgrade notes in @jobenvil’s link into the nginx config inside the seafile container (DOCKER_DATA_FOLDER/seafile/nginx/conf/seafile.nginx.conf) and did a docker-compose restart.

I didn’t read “Upgrade notes” as I did a fresh install, and didn’t question the official Docker image. Well, Seafile is good software, but it’s still the same mess as years ago when I abondoned my first tries with it. The documentation is a chaos, and the release packages are obvisously not better :-/. I’ll try to report the issue, as soon as I find out the right place for docker image related issues. But I hope they get their things together sometime soon.

1 Like