1-确保环境已经部署SSL模块

//检查是否安装ssl
httpd -M | grep ssl
//安装mod和openssl
yum install openssl
yum install mod_ssl

2-检查和启动ssl

cd /etc/httpd/conf.d/

3-引入ssl配置,在http.conf去掉下面的注释
Include conf/extra/httpd-ssl.conf

4-虚拟vhost配置

<VirtualHost *:443>
DocumentRoot /home/www/wwwroot/zhibo
ServerName zhibo.kinmor.com:443
SetEnv no-gzip
SSLEngine on
SSLCertificateFile "/etc/letsencrypt/live/kinmor.com/fullchain.pem"
SSLCertificateKeyFile "/etc/letsencrypt/live/kinmor.com/privkey.pem"
    <Directory /home/www/wwwroot/zhibo>
        SetOutputFilter DEFLATE
        Options FollowSymLinks
        AllowOverride All
        Order Deny,Allow
        Require all granted
        DirectoryIndex index.php index.html index.htm
    </Directory>
</VirtualHost>

5-重启httpd

service httpd restart

标签: apache, https, letsencrypt, ssl, vhost, ssl_conf

添加新评论