Hello, I don’t understand why android app is not working. Desktop clients and web interface work fine.
Can’t download files and can’t upload or sync photos.
I’m pretty sure something is wrong in nginx, but can’t figure out what.
Here is my nginx conf (replaced real names and ip):
server {
server_name seafile.example.com;
listen 443 ssl http2;
error_page 497 https://$host:$server_port$request_uri;
server_tokens off;
ssl on;
ssl_certificate /etc/ssl/websites/seafile.example.com.cer;
ssl_certificate_key /etc/ssl/websites/seafile.example.com.key;
ssl_session_timeout 5m;
ssl_dhparam /etc/ssl/websites/dhparam.pem;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
ssl_prefer_server_ciphers on;
add_header Strict-Transport-Security "max-age=31536000";
add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
proxy_set_header X-Forwarded-For $remote_addr;
location / {
proxy_pass http://127.0.0.1:8000;
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;
proxy_set_header X-Forwarded-Proto https;
access_log /var/log/nginx/seahub.access.log;
error_log /var/log/nginx/seahub.error.log;
client_max_body_size 0;
}
location /seafhttp {
rewrite ^/seafhttp(.*)$ $1 break;
proxy_pass http://127.0.0.1:8082;
proxy_request_buffering off;
client_max_body_size 0;
proxy_connect_timeout 36000s;
proxy_read_timeout 36000s;
proxy_send_timeout 36000s;
send_timeout 36000s;
access_log /var/log/nginx/seafhttp.access.log;
error_log /var/log/nginx/seafhttp.error.log;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /media {
root /home/seafile/seafile-server-latest/seahub;
}
}
There are errors in nginx logs:
seahub.access.log:
x.x.x.x - - [01/Sep/2020:16:03:14 +0200] "GET /api2/repos/dc394e57-d480-44f2-9298-26f39c583cb2/upload-link/?p=My+Photos%2FCamera HTTP/1.1" 200 84 "-" "Dalvik/2.1.0 (Linux; U; Android 9; Redmi Note 4 Build/PQ3A.190801.002)"
seafhttp.error.log
2020/08/31 23:59:02 [error] 2406#2406: *87732 connect() failed (111: Connection refused) while connecting to upstream, client: x.x.x.x, server: seafile.example.com, request: "GET /seafhttp/repo/6d5d7600-c8ca-490e-bbe2-31d368b21f9f/commit/HEAD HTTP/2.0", upstream: "http://127.0.0.1:8082/repo/6d5d7600-c8ca-490e-bbe2-31d368b21f9f/commit/HEAD", host: "seafile.example.com"
seafhttp.access.log
x.x.x.x - - [01/Sep/2020:16:02:53 +0200] "GET /seafhttp/upload-api/fa5a5b7b-b469-4f1f-8fb2-31809c23fbac HTTP/2.0" 400 0 "-" "okhttp/3.9.1"
here my conf files:
seafile.conf
[fileserver]
port=8082
host = 127.0.0.1
seahub_settings.py
# -*- coding: utf-8 -*-
SECRET_KEY = "mysecretkey"
FILE_SERVER_ROOT = 'http://seafile.example.com/seafhttp'
any help please?
