当前位置:文档之家› Apache 下启用 Https

Apache 下启用 Https

Apache 下启? Https

请使? Apache 2.4 版本。

通过 OpenSSL ?成 SSL 数字认证

免费 Self-Signed SSL 数字认证?户请看. 如果你是 SSL 付费认证?户可跳过此步.

openssl genrsa -out privkey.pem 2048

openssl req -new -x509 -key privkey.pem -out cacert.pem -days 1095在 Seahub 端启? https

假设你已经按照Apache 下配置 Seahub对 Apache 进?了相关设置.请启?mod_ssl

[sudo] a2enmod ssl

接下来修改你的 Apache 配置?件,这是?例:

ServerName https://www.doczj.com/doc/092273247.html,

DocumentRoot /var/www

SSLEngine On

SSLCertificateFile /path/to/cacert.pem

SSLCertificateKeyFile /path/to/privkey.pem

Alias /media /home/user/haiwen/seafile-server-latest/seahub/medi

ProxyPass !

Require all granted

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 Request_URI . proxy-fcgi-pathinfo=unescape

SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

ProxyPass / fcgi://127.0.0.1:8000/

修改 SERVICE_URL 和 FILE_SERVER_ROOT

下?还需要更新 SERVICE_URL 和 FILE_SERVER_ROOT 这两个配置项。否则?法通过 Web 正常的上传和下载?件。

5.0 版本开始,您可以直接通过管理员 Web 界?来设置这两个值:(注意,如果同时在Web 界?和配置?件中设置了这个值,以 Web 界?的配置为准。)

SERVICE_URL: https://https://www.doczj.com/doc/092273247.html,

FILE_SERVER_ROOT: https://https://www.doczj.com/doc/092273247.html,/seafhttp

启动 Seafile 和 Seahub

./seafile.sh start

./seahub.sh start-fastcgi

W3Cschool(https://www.doczj.com/doc/092273247.html,)最?的技术知识分享与学习平台

此篇内容来?于https://www.doczj.com/doc/092273247.html,?站?户上传并发布。

相关主题
文本预览
相关文档 最新文档