按照官方的文档安装好了seafile,使用yum安装的httpd,此时配置好了之后web和客户端使用都正常。后来尝试使用https,也是参照官方文档的配置。配置好之后能正常登录,但是在web上下载文件或者预览图片都提示文件不存在。换回http就正常。
以下是配置文件:
<VirtualHost *:443>
ServerName jwgx-netdisk
# Use “DocumentRoot /var/www/html” for Centos/Fedora
# Use “DocumentRoot /var/www” for Ubuntu/Debian
DocumentRoot /var/www
SSLEngine On
SSLCertificateFile /home/w-yibin/cacert.pem
SSLCertificateKeyFile /home/w-yibin/privkey.pem
Alias /media /home/w-yibin/netdisk/seafile-server-latest/seahub/media
RewriteEngine On
<Location /media>
Require all granted
</Location>
#RewriteEngine On
#
# seafile fileserver
#
ProxyPass /seafhttp http://127.0.0.1:8082
ProxyPassReverse /seafhttp http://127.0.0.1:8082
RewriteRule ^/seafhttp - [QSA,L]
#
# seahub
#
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
ProxyPass / fcgi://127.0.0.1:8000/
ProxyPassReverse / fcgi://127.0.0.1:8000/