'502 Bad Gateway' when trying to download/upload a file.

98 views
Skip to first unread message

Darf_

unread,
Jul 28, 2015, 1:07:54 PM7/28/15
to seafile

Hey there,

I’ve just installed seafile 4.3.0 with nginx on a Raspberry Pi running debian (nginx is ran by the admin user while seafile is ran by a ‘seafile’ user, but I get this error even wher running everything as root).
The website is working, but every time I try to download or upload a file, I have an error message from nginx saying ‘502 Bad Gateway’.

More info :
The URL I’m trying to reach https://cloud.mysite.net/seafhttp/files/8caf2904-bf77-4b0b-ba53-92435e6e6b56/seafile-tutorial.doc

  • My nginx config file :

      server {
          listen       80;
          server_name  cloud.mysite.net;
          rewrite ^ https://$http_host$request_uri? permanent;    # force redirect http to https
      }
      server {
          listen 443;
          ssl on;
          ssl_certificate /etc/nginx/ssl/cacert.pem;        # path to your cacert.pem
          ssl_certificate_key /etc/nginx/ssl/privkey.pem;    # path to your privkey.pem
          server_name cloud.mysite.net;
          proxy_set_header X-Forwarded-For $remote_addr;
    
          add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
          server_tokens off;
    
          location / {
              fastcgi_pass    127.0.0.1:8000;
              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;
    
              access_log      /var/log/nginx/seahub.access.log;
              error_log       /var/log/nginx/seahub.error.log;
          }
          location /seafhttp {
              rewrite ^/seafhttp(.*)$ 0,90€ break;
              proxy_pass http://127.0.0.1:8082;
              client_max_body_size 0;
              proxy_connect_timeout  36000s;
              proxy_read_timeout  36000s;
          }
          location /media {
              root /home/seafile/mycloud/seafile-server-latest/seahub;
              include /etc/nginx/mime.types;
          }
      }
    
  • ccnet.conf :

    [General]
    USER_NAME = mycloud
    ID = XXXXXXXXXXXXXXXXX
    NAME = mycloud
    SERVICE_URL = https://cloud.mysite.net
    
    [Client]
    PORT = 13419
    
  • seahub_settings.py :

    SECRET_KEY = "XXXXXXXXXXXXXXXXXXXXXXX"
    FILE_SERVER_ROOT = 'https://cloud.mysite.net/seafhttp'
    

Any suggestion appreciated !

Darf_

Shuai Lin

unread,
Jul 28, 2015, 9:40:10 PM7/28/15
to sea...@googlegroups.com
This google group has been deprecated for a long time, please go to https://forum.seafile-server.org .

--
You received this message because you are subscribed to the Google Groups "seafile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seafile+u...@googlegroups.com.
To post to this group, send email to sea...@googlegroups.com.
Visit this group at http://groups.google.com/group/seafile.
For more options, visit https://groups.google.com/d/optout.

Darf_

unread,
Jul 29, 2015, 7:55:55 AM7/29/15
to seafile, linshu...@gmail.com
Oops, my bad, thanks for the heads up.
For reference, this has been reposted to : https://forum.seafile-server.org/t/502-bad-gateway-when-trying-to-download-upload-a-file/2336
Reply all
Reply to author
Forward
0 new messages