startssl提供的免费SSL证书安装(Debian)

启用Apache ssl模块:
a2enmod ssl

启用433端口:
vim /etc/apache2/ports.conf
添加:Listen 433

将申请证书时获得的四个文件上传到服务器:

ca.pem  ssl.crt  ssl.key  sub.class1.server.ca.pem

增加虚拟主机SSL,确保包含以下内容:
http://www.startssl.com/?app=21

重定向设置:

启用rewrite模块
a2enmod rewrite
在配置文件中加入以下内容
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteCond %{REQUEST_URI} !^/help/(.*)$
RewriteRule ^/?(.*)$ https://%{SERVER_NAME}/$1 [L,R]

posted on 2010-06-19 22:31  ddper  阅读(352)  评论(0编辑  收藏  举报

导航