I have followed seafile readthedocs io guide and after basic set up my seafile server was working fine. I had no problems hosting seafile server on linux, and acessing and synchronizing files on linux, windows and android clients. After a week or so, I decided what it would be nice to add ssl certificate.
I created and installed my own certificate with letsencrypt and certbot and after that I configured nginx according to the guide. But now I’m having some problems.
I can access https : / / seafile mydomain com web service and upload files. Same with android client.
But on windows client, the most important one to me, I get “Unhandled http redirect from server. Please check server configuration.” error.
Things I have tried but didn’t work for me:
proxy_set_header Host $host:$server_port as seen in other thread
in windows client application change client address to https
checked seahub_settings.py and ccnet.conf. Https is set
deleting sqlite .db file
At this point I am lost, and don’t know where to look. I would be really happy, if someone could help me or at least point me in the right direction.
Here is my configuration file
After trying to debug for a bit I think a managed to narrow my problem a bit.
This is not seafile problem, but nginx configuration problem.
By watching nginx logs and /seafhttp logs I managed to find that these requests are not being redirected to /seafhttp
if ($request_method = GET) {
rewrite ^ https :// $http_host$request_uri? permanent; # force redirect http to https
}
I don’t know which change solved my problem and I still don’t know that is correct way to setup but at this point I’m too afraid to change anything so that I don’t break something again
I wanted to increase security by using https with letsencrypt certificates. I don’t think I succeeded, but I guess first ill need to complete courses on cryptography and IT security first, before tinkering with settings.
Anyway, thank you everyone in this thread for help!
I had same issue, i don’t know why suddenly. I had to stop synchronisation, unsynch libraries, delete profile, etc. It seems weird, but I didn’t know really what was helping exactly and not idea what was the trigger. I understand your fear though.
The issue may be with the Windows client itself. Try to uninstall the client, accept the dialog asking if you want to delete the profiles, and then reinstall. For me this worked.
I also tweaked my DNS server to point to the root domain by default (instead of www), but I don’t think this was the culprit.