<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /usr/local/apache/cert/zhh/_.zhh.com.cer
SSLCertificateKeyFile /usr/local/apache/cert/zhh/_.zhh.com.key
<Directory />
Options +FollowSymLinks
Options -Indexes
DirectoryIndex index.php
</Directory>
ServerName www.zhh.com
ServerAlias zhh.com www.zhh.com
ServerAdmin admin@tuandai.com
ErrorLog "| /usr/local/apache/bin/rotatelogs /usr/local/apache/logs/https_zhh_error_%Y%m%d.log 86400 480"
CustomLog "| /usr/local/apache/bin/rotatelogs /usr/local/apache/logs/https_zhh_access_%Y%m%d.log 86400 480" common
RewriteEngine on
DocumentRoot /var/www/html/zhh
<Directory "/var/www/html/zhh">
Options FollowSymLinks
AllowOverride all
Require all granted
</Directory>
<DirectoryMatch "/var/www/html/zhh/(assets|css|images|js)$">
php_admin_flag engine off
Options -Indexes
</DirectoryMatch>
</VirtualHost>
1.安装ssl模块
yum install mod_ssl openssl
2.修改httpd.conf文件
LoadModule ssl_module modules/mod_ssl.so
Include conf/extra/httpd-ssl.conf
3.修改conf/extra/httpd-ssl.conf文件,修改为证书所在的位置
SSLCertificateFile "D:/wamp/Apache2/bin/server.crt"
SSLCertificateKeyFile "D:/wamp/Apache2/bin/server.key"
4.如果重起apach无法访问
检查下防火墙是否打开,并且允许443端口