apache - Seafile 安装 - {"detail":"Authentication credentials were not provided."}

标签 apache ssl lets-encrypt certbot seafile-server

我目前正在尝试在我自己的服务器 Ubuntu 14.04 上使用 Apache 2.4+ 重新安装 Seafile,并使用 CertBot 加密以获得 SSL 证书。

我按照服务器手册重新安装了 Seafile:

Deploying with MySQL

Deploying with Apache

Enabling Https with Apache

这让我想到了这个虚拟主机配置:

<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>

使用此配置,我可以继续运行运行良好的 Web 应用程序,服务器端没有任何错误,而且所有功能似乎都在运行。

但是如果我尝试使用服务器附带的客户端,当我尝试登录到服务器时,我只会在客户端日志中出现“无法连接”并出现此错误:

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

我尝试通过 curl 使用

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

这导致我犯了同样的错误。我认为这个问题可能与 letsencrypt 有关,因为上次我在没有 https 的情况下安装 seafile 时它是有效的,但这次没有。

注意:我也尝试禁用 seafile 检查证书,但它也不起作用。

注意 2:是的,我在端口 8003 上以 fast-cgi 启动了 seahub

我看到有很多关于 django 的主题都有这个错误,但我不知道如何将它应用到我的问题中。另外,因为我似乎是唯一一个遇到 seafile 问题的人,所以我不认为它有问题,而只是我的安装有问题。

最佳答案

我终于没有找到这个问题的任何答案。我可能做错了什么,但我仍然不知道是什么。

我重新安装了整个 Seafile,它现在可以工作了。我不太喜欢“重新安装以修复”的概念,但好吧......至少它有效。

关于apache - Seafile 安装 - {"detail":"Authentication credentials were not provided."},我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45452877/

相关文章:

php - htaccess 资源被解释为样式表但以 MIME 类型 text/html 传输

apache - 无法在 Apache htaccess 中重写和重定向 API URI

Go:使用存储在 SmartCard 上的客户端证书的 HTTPS 请求 (Windows)

android - 验证 Android 等智能手机应用程序的不同方法

ssl - 在 Amazon CloudFront 上通过 HTTPS 提供静态内容

Apache2 启动失败

带有自动 SSL 的 .NET Core Docker

PHP5.3(作为Apache模块)无法写入/var/www/<project-name>/<document-root>/cache

django - 即使在设置权限后 Nginx 403 也被禁止

php - 单击 'Refresh' 会使 phpMyAdmin 崩溃