Seafdav nginx config for WebDAV w/o fastcgi (since 6.3)

Since 6.3 I believe Seafile ditched fastcgi support. The manual still includes fastcgi in their example nginx seafdav configuration, but obviously that doesn’t work anymore, like so:

location /seafdav {
    fastcgi_pass    127.0.0.1:8080;
    fastcgi_param   SCRIPT_FILENAME     $document_root$fastcgi_script_name;
    fastcgi_param   PATH_INFO           $fastcgi_script_name;

    fastcgi_param   SERVER_PROTOCOL     $server_protocol;
    fastcgi_param   QUERY_STRING        $query_string;
    fastcgi_param   REQUEST_METHOD      $request_method;
    fastcgi_param   CONTENT_TYPE        $content_type;
    fastcgi_param   CONTENT_LENGTH      $content_length;
    fastcgi_param   SERVER_ADDR         $server_addr;
    fastcgi_param   SERVER_PORT         $server_port;
    fastcgi_param   SERVER_NAME         $server_name;
    fastcgi_param   HTTPS               on;
    fastcgi_param   HTTP_SCHEME         https;

    client_max_body_size 0;
    proxy_connect_timeout  36000s;
    proxy_read_timeout  36000s;
    proxy_send_timeout  36000s;
    send_timeout  36000s;

    # This option is only available for Nginx >= 1.8.0. See more details below.
    proxy_request_buffering off;

    access_log      /var/log/nginx/seafdav.access.log;
    error_log       /var/log/nginx/seafdav.error.log;
}

What would be the appropriate configuration for seafdav? It worked fine for years before the upgrade.

Best

Eno

The topic has come up before ( see here for example) but I’m not certain it has been answered completely. I was left with the impression that fastcgi is still OK for WebDAV.

Perhaps @Jonathan at Seafile or @DerDanilo can clarify. I’d like to know for sure what the situation is for WebDAV and fastcgi.

1 Like

https://seafile.readthedocs.io/en/latest/installation/reverseproxy-webserver/#configuring-the-server-for-using-nginx

This is the config that still works for me.
The manual needs some updates though. The community doesn’t seem to trilled supporting or contributing to the documentation. Take everything that is for free but don’t give anything back, what a wonderful world. :-/

3 Likes

Thanks @mercury and @DerDanilo for pointing me into the right direction. I had only found and consulted the official manual which doesn’t provide an example for non-fastcgi WebDAV as of yet. And I didn’t know there is a community-based manual for Seafile.
The configuration given there finally works, while the fastcgi one had produced a 502 since the update. Thanks for helping out (and hopefully others will find this useful too)!

Oh no - I did not know about a community manual.

Maybe it would fair to pin that so it would be much more popular.

1 Like

Hi Danilo

First time I read about the community manual as well.
Let’s see how it can be contributed there.

Would be great to get it to the official manual as well though, no?
I still only see webdav with FastCGI in official manual and also in the Docker Image.

(Sorry to mention Docker everywhere, I guess it’s obvious that I just got started to dive into the Docker World ;-))

1 Like

Hi,

i also changed my WebDAV Config like in the above Community Manual, but i still cant access the Libary over WebDAV.
Serverversion: 6.3.5
I getting an “Connection Refused” error…

seafdav.conf
[WEBDAV]
enabled = true
port = 8080
host = localhost
fastcgi = false
share_name = /seafdav

LOGS:
supe@ERGCLOUD01:~$ cat /var/log/nginx/seafdav.access.log
87.166.XXX.XXX - - [01/Oct/2018:21:17:31 +0200] “OPTIONS /seafdav HTTP/2.0” 502 253 “-” “ReaddleDAV Documents/6.6.1.562 (redirects)”
87.166.XXX.XXX - - [01/Oct/2018:21:17:34 +0200] “OPTIONS /seafdav HTTP/2.0” 502 253 “-” “ReaddleDAV Documents/6.6.1.562 (redirects)”
87.166.XXX.XXX - - [01/Oct/2018:21:17:36 +0200] “OPTIONS /seafdav HTTP/2.0” 502 253 “-” “ReaddleDAV Documents/6.6.1.562 (redirects)”
supe@ERGCLOUD01:~$ cat /var/log/nginx/seafdav.error.log
2018/10/01 21:17:31 [error] 2864#2864: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 87.166.XXX.XXX, server: , request: “OPTIONS /seafdav HTTP/2.0”, upstream: “http://127.0.0.1:8080/seafdav”, host: “datacenter.XXX.de:65443
2018/10/01 21:17:34 [error] 2864#2864: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 87.166.XXX.XXX, server: , request: “OPTIONS /seafdav HTTP/2.0”, upstream: “http://127.0.0.1:8080/seafdav”, host: “datacenter.XXX.de:65443
2018/10/01 21:17:36 [error] 2864#2864: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 87.166.XXX.XXX, server: , request: “OPTIONS /seafdav HTTP/2.0”, upstream: “http://127.0.0.1:8080/seafdav”, host: “datacenter.XXX.de:65443
supe@ERGCLOUD01:~$

Hello,

does nobody have the same issues ?
How can I get WebDAV working again?

Thanks.

Well it still works fine with the config shown in the community manual.

Hello,

thanks for your answer.
I have configured it as shown in the community manual, but i receiving the error shown above…

Basic question, but did you enable seadav in the corresponding config file and restart seafile+seahub afterwards?
Any firewall rules in place?

Hello,
Yes it is enabled. Also rebooted and latest updates are Installed.
Also before 6.3 it was already working on this Host.

Regarding the Firewall Question:
It is all on the same Host!? (Ubuntu 16.04 LTS Server)

Hello,

any Idea ?
Why do I get an Connection refused from the ReaddleDAV Server ?

Using 6.3.4 CE the fastcgi webdav configuration is still working but the proxy config seafdav from the community manual is not. The client is just waiting and there is nothing in the logfile. Any tips ?

This one still works fine for me.

https://seafile.readthedocs.io/en/latest/config/seafile/seadav/

1 Like

Yes, thanks. My fault, forgot to disable fastcgi in seafdav.conf

1 Like

I know it is an old Topic, but in case you have Problems with Seafdav / Webdav please check your pid:

"
turned out that the file pids/seafdav.pid was stale. So seafile-controller did not start it.
"

1 Like