首页 > 其他 > 详细

centos7的ssl

时间:2015-10-02 06:41:17      阅读:612      评论:0      收藏:0      [点我收藏+]

在虚拟机中验证可行,分享一下。

yum list installed | grep ssl
mod_ssl.x86_64 解:这个模块将Apache和mod联系在一起,如果没有需要安装mod_ssl
openssl.x86_64

cd /etc/httpd/conf
openssl genrsa -out localhost.key 1024建立密钥
openssl req -new -key localhost.key -out localhost.csr建立公钥
openssl x509 -req -days 365 -in localhost.csr -signkey localhost.key -out localhost.crt建立服务器证书
vim /etc/httpd/conf.d/ssl.conf修改配置文件
LoadModule ssl_module modules/mod_ssl.so新增
DocumentRoot "/www/gpic/"修改,根据实际情况设定
ServerName www.gpic.com:443修改,根据实际情况设定
SSLCertificateFile /etc/httpd/conf/localhost.crt修改,就是之前步骤生成的文件,
SSLCertificateKeyFile /etc/httpd/conf/localhost.key修改,就是之前步骤生成的文件,


本文出自 “做最好的自己” 博客,请务必保留此出处http://mm800805.blog.51cto.com/617733/1699838

centos7的ssl

原文:http://mm800805.blog.51cto.com/617733/1699838

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!