apachessllets-encryptcertbotseafile-server

Seafile installation - {"detail":"Authentication credentials were not provided."}


I am currently trying to re-install seafile on my own server Ubuntu 14.04 with Apache 2.4+ and Let's Encrypt with CertBot for SSL certificates.

I did a fresh installation of seafile following server manual:

Deploying with MySQL

Deploying with Apache

Enabling Https with Apache

Which lead me to this virtual host configuration:

<VirtualHost *:80>
ServerName file.lecnet.fr
DocumentRoot /var/www
RewriteEngine on
RewriteRule / https://file.lecnet.fr/
RewriteCond %{SERVER_NAME} =file.lecnet.fr
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

<VirtualHost *:443>
ServerName file.lecnet.fr
DocumentRoot /var/www
SSLEngine On
SSLCertificateFile /etc/letsencrypt/live/file.lecnet.fr/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/file.lecnet.fr/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/file.lecnet.fr/fullchain.pem
Alias /media /home/lecomteg/lecfile/seafile-server-latest/seahub/media
<Location /media>
Require all granted
</Location>

RewriteEngine On

ProxyPass /seafhttp http://127.0.0.1:8082
ProxyPassReverse /seafhttp http://127.0.0.1:8082
RewriteRule ^/seafhttp - [QSA,L]

SetEnvIf Request_URI . proxy-fcgi-pathinfo=unescape
SetEnvIf Authorization "(.*)" HTTP_ATHORIZATION=$1
ProxyPass / fcgi://127.0.0.1:8003/

CustomLog /var/www/vhosts/prod/panel.lecnet.fr/logs/file.log combined
ErrorLog /var/www/vhosts/prod/panel.lecnet.fr/logs/file_error.log
</VirtualHost>

With this configuration, I can go on the web application which work fine, I don't have any error server side and all the functionnalities seems to be working.

But if I try to use the client that goes with the server, when I try to login to the server, I just have a "Impossible connection" that appear with this error in logs client side:

[08/02/17 08:07:38]request failed for https://file.lecnet.fr/api2/account/info/: {"detail":"Authentication credentials were not provided."}

I tried to do it via curl using

curl -d "username=username&password=xxxxx" https://file.lecnet.fr/api2/account/info/

which lead me to the same error. I'm thinking that the problem can be linked to letsencrypt as it was working last time I installed seafile without https but not this time with it.

NB: I also tried to disable seafile checking certificates but it doesn't work either.

NB 2: Yes, I started seahub as fast-cgi on port 8003

I saw that there is a lot of subject about django with this error, but I don't know how to apply this to my problem. Also, as I seem to be the only one that has this problem with seafile, I don't think that there's a problem with it but just a problem with my install.


Solution

  • I finally don't found any answer to this problem. I probably did something wrong but I still can't figure what.

    I reinstalled the entire seafile and it now works. I'm not really please with the "reinstall to repair" concept but well...At least it works.