yum install mod_ssl openssl
安装好之后 会自动生成一个/etc/httpd/conf.d/ssl.conf文件 和 /etc/httpd/conf.modules.d/00-ssl.conf文件
开启443端口
然后把你下载好的证书解压后得到的文件夹改名成cert,然后上传到服务器 放到 /etc/httpd/ 目录下
开始配置ssl.conf文件
找到对应的修改(这里用的是阿里云的免费证书)
DocumentRoot "你的目录"
ServerName 域名:443
SSLCipherSuite HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM
SSLHonorCipherOrder on
SSLCertificateFile cert/public.crt
SSLCertificateKeyFile cert/214774279910920.key
SSLCertificateChainFile cert/chain.crt
然后重启apache就好了
如果在访问的时候发现没有权限访问
You don't have permission to access x.php on this server.
这个时候需要配置httpd.conf
<Directory />
Options Indexes FollowSymLinks
AllowOverride None
</Directory>
http.conf的配置来自http://sjpsega.iteye.com/blog/150d7439
然后重启apache就好了
————————————————