1.下载ssl证书,并上传至服务器
2安装mod_ssl
yum install -y mod_ssl #安装mod_ssl
3.创建证书目录,并把证书放入目录中
4.进入ssl.conf修改配置
vim ssl.conf
取消以下注释
#DocumentRoot "/var/www/html/"
#ServerName apache.iternalsoft.com:443
修改文件路径
SSLCertficateFile /etc/httpd/conf/ssl/web.pem
SSLCertficateKeyFile / etc/httpd/conf/ssl/server.key
多域名ssl配置,需要修改域名配置文件
<VirtualHost *:80 *:443>
DocumentRoot "域名文件夹地址"
ServerName 二级域名
ServerAlias 二级域名
SSLEngine on
SSLProtocol all -SSLv2 -SSLV3
SSLCipherSuite ALL:!DH:!EXPORT:!RC4:+HIGH:+MEDIUM:!aNULL:!eNULL
SSLCertificateFile "证书.pem文件路径"
SSLCertificateKeyFile "证书.key文件路径"
<Directory "域名文件夹地址">
SetOutputFilter DEFLATE
Options FollowSymLinks ExecCGI
Require all granted
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
网友评论