My YunoHost server
Hardware: Raspberry Pi4, 4GB
YunoHost version: 4.2.6.1
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 https://example.noho.st/seafile
In the Seafile System Admin screen, I set
SERVICE_URL: https://example.noho.st/seafile
-
FILE_SERVER_ROOT: https://example.noho.st/seafile/seafhttp
and restarted the services seafile and seahub.
Problem:
- 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 https://example.noho.st/seafhttp/protocol-version: 302.
Yunohost /var/log/nginx/example.noho.st-access.log
62.113.194.88 - - [18/Jul/2021:10:54:45 +0100] "GET /seafhttp/protocol-version HTTP/1.1" 302 154 "-" "SeaDrive/2.0.14 (Windows NT)"
62.113.194.88 - - [18/Jul/2021:10:54:54 +0100] "GET /seafhttp/protocol-version HTTP/1.1" 302 154 "-" "SeaDrive/2.0.14 (Windows NT)"
62.113.194.88 - - [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
- Can't upload/download files with Android client - #3 by Johnnii360 - Seafile Client - Seafile Community Forum
- Config Seahub with Nginx - Seafile admin manual
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
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;
server_name seafile.example.com;
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;
# 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](http://en.wikipedia.org/wiki/FastCGI),
# which is not recommended, you should use the following config for location `/`.
#
# 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 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;
proxy_pass http://127.0.0.1:8082;
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.