re2121 发表于 2015-1-19 08:40:20

https服务器的配置(四)配置https

一、配置httpd.conf这其中会报错根据提示的错误来开启对应的mod
# vim /etc/httpd/httpd.conf
LoadModule ssl_module modules/mod_ssl.so
LoadModule socache_shmcb_modulemodules/mod_socache_shmcb.so

开启include
Include /etc/httpd/extra/httpd-ssl.conf


二、然后在httpd-ssl.conf中配置

# vim /etc/httpd/extra/httpd-ssl.conf

Listen 443
AddType application/x-x509-ca-ca-cert .crt
AddType application/x-pkcs7-crl       .crl



DocumentRoot"/usr/local/apache/htdocs/www.hby.com"
ServerName www.hby.com:443



SSLCertificateFile"/etc/httpd/ssl/httpd.crt"

SSLCertificateKeyFile"/etc/httpd/ssl/httpd.key"

重启httpd

三、去CA所在服务器上把CA的证书下载到你的本地

/etc/pki/CA/cacert.pem

这个文件
在本地修改后缀名让文件变成cacert.crt

四、我们先访问下https://www.hby.com

五、安装证书
双击cacert.crt

点击安装

下一步



选择后确定下一步。

如果出现未响应的
请这样操作

打开服务
工商银行ICBC这两个服务开启你要是装了其他银行的对应开启就行了

然后再安装
OK再来访问



页: [1]
查看完整版本: https服务器的配置(四)配置https