Seafile: Bad response code for GET 302

My YunoHost server

Hardware: Raspberry Pi4, 4GB
YunoHost version:
I have access to my server : Through SSH: yes | through the webadmin: yes | direct access via keyboard / screen : No
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
If yes, please explain:

Description of my issue

I have installed Seafile in current version 7.0.5~ynh1.
Through the Yunohost Webadmin UI I set the “access URL of this application (domain and/or path).” to

In the Seafile System Admin screen, I set

    and restarted the services seafile and seahub.


  • Seafile client application (Android, Windows) cannot upload or download any files.
  • Through the Seafile WebUi however, this is possible.

Here are some logs:

Windows Seafile Client seadrive.log

[07/18/21 11:49:54] Bad response code for GET 302.

Yunohost /var/log/nginx/ - - [18/Jul/2021:10:54:45 +0100] "GET /seafhttp/protocol-version HTTP/1.1" 302 154 "-" "SeaDrive/2.0.14 (Windows NT)" - - [18/Jul/2021:10:54:54 +0100] "GET /seafhttp/protocol-version HTTP/1.1" 302 154 "-" "SeaDrive/2.0.14 (Windows NT)" - - [18/Jul/2021:10:55:04 +0100] "GET /seafhttp/protocol-version HTTP/1.1" 302 154 "-" "SeaDrive/2.0.14 (Windows NT)"

Some Clues
This seems to be related to nginx and how it serves https.

Here are some posts I googled

I have been trying to follow the Seafile manual “deploy with nginx”

sudo touch /etc/nginx/sites-available/seafile.conf
sudo ln -s /etc/nginx/sites-available/seafile.conf /etc/nginx/sites-enabled/seafile.conf
sudo nano /etc/nginx/sites-available/seafile.conf


log_format seafileformat '$http_x_forwarded_for $remote_addr [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" $upstream_response_time';

server {
    listen 80;

    proxy_set_header X-Forwarded-For $remote_addr;

    location / {
         proxy_set_header   Host $host;
         proxy_set_header   X-Real-IP $remote_addr;
         proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
         proxy_set_header   X-Forwarded-Host $server_name;
         proxy_read_timeout  1200s;

         # used for view/edit office file via Office Online Server
         client_max_body_size 0;

         access_log      /var/log/nginx/seahub.access.log seafileformat;
         error_log       /var/log/nginx/seahub.error.log;

# If you are using [FastCGI](,
# which is not recommended, you should use the following config for location `/`.
#    location / {
#         fastcgi_pass;
#         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   REMOTE_ADDR         $remote_addr;
#        fastcgi_read_timeout 36000;
#         client_max_body_size 0;
#         access_log      /var/log/nginx/seahub.access.log;
#        error_log       /var/log/nginx/seahub.error.log;
#    }

    location /seafhttp {
        rewrite ^/seafhttp(.*)$ $1 break;
        client_max_body_size 0;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;

        proxy_connect_timeout  36000s;
        proxy_read_timeout  36000s;
        proxy_send_timeout  36000s;

        send_timeout  36000s;

        access_log      /var/log/nginx/seafhttp.access.log seafileformat;
        error_log       /var/log/nginx/seafhttp.error.log;
    location /media {
        root /home/user/haiwen/seafile-server-latest/seahub;

then rebooted the whole Yunohost.

The problem still persist.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.