安装https证书
一、apache
1.在Apache的安装目录下创建cert目录,将下载的全部文件拷贝到cert目录中
find / -name httpd
2.修改httpd.conf文件,开启
#LoadModule ssl_module modules/mod_ssl.so (如果找不到请确认是否编译过 openssl 插件)
#Include conf/extra/httpd-ssl.conf
3.修改httpd-vhost.conf文件
find / -name httpd-vhosts.conf
<VirtualHost *:443>
ServerName qmzg.boc7.net
SSLEngine on
SSLProtocol all -SSLv2 -SSLv3
SSLCipherSuite HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM
SSLCertificateFile /usr/local/apache/cert/public.pem
SSLCertificateKeyFile /usr/local/apache/cert/214836762610412.key
SSLCertificateChainFile /usr/local/apache/cert/chain.pem
DocumentRoot "/data/wwwroot/project"
<Directory "/data/wwwroot/project">
#AllowOverride None
AllowOverride All
Order Deny,Allow
Allow from All
DirectoryIndex index.php
</Directory>
</VirtualHost>
4.查看443端口监听状态
netstat -anp | grep
5,httpd.conf文件添加监听
Listen 443
6.重启apache
service httpd restart
7.https访问,测试配置结果
注意:forbidden的话,可以先设置为默认访问路径
二、nignx