Hi there,
I enabled HTTPS with Nginx according to the manual. Currently running Version 9.0.7 over Win 10 with WSL/Ubuntu.
Webpage, login etc. is working and I can upload files with no problem at all. I can also see all my files, but downloads are not working or get stuck after a few KB. Sometimes I get 0 KB, my record is 912 KB. Which means, that I can download VERY small files, if I’m lucky. Not usable at the moment.
Current settings (via admin over the web page)
(h ttps = https):
SERVICE_URL h ttps://my-secret-server.de
FILE_SERVER_ROOT h ttps://my-secret-server.de/seafhttp
When setting it to the unsecure HTTP URLs and opening the page without nginx downloads are working again:
SERVICE_URL h ttp://my-secret-server.de:8000
FILE_SERVER_ROOT h ttp://my-secret-server.de:8082
Tried so many variants within the nginx seafile config and everything. Trying for days now and am officially stuck.
Would really appreciate the help.
Thanks!
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 secret-server.de;rewrite ^ https://$http_host$request_uri? permanent; # Forced redirect from HTTP to HTTPS
server_tokens off; # Prevents the Nginx version from being displayed in the HTTP response header#proxy_set_header X-Forwarded-For $remote_addr;
}
server {
listen 443 ssl;
#ssl on;
ssl_certificate /etc/letsencrypt/live/secret-server.de/fullchain.pem; # Path to your fullchain.pem
ssl_certificate_key /etc/letsencrypt/live/secret-server.de/privkey.pem; # Path to your privkey.pem
server_name secret-server.de;
server_tokens off;location / { proxy_pass http://127.0.0.1:8000; #proxy_set_header Host $host:8000; #proxy_set_header Host $host:$server_port; 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 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; proxy_request_buffering off; send_timeout 36000s; access_log /var/log/nginx/seafhttp.access.log seafileformat; error_log /var/log/nginx/seafhttp.error.log; } location /media { #root /opt/seafile/seafile-server-latest/seahub; root /mnt/c/SERVER/Linux/seafile-server-9.0.7/seahub; }
}