1、前往阿里云官网申请免费证书选择
2、证书存放在/etc/cert
3、httpd.cof 配置ssl
<VirtualHost _default_:443> ServerName 域名 DocumentRoot 网站根目录 SSLEngine on SSLProtocol all -SSLv2 -SSLv3 SSLCipherSuite HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM SSLHonorCipherOrder on SSLCertificateFile /etc/httpd/cert/crt SSLCertificateKeyFile /etc/httpd/cert/key SSLCertificateChainFile /etc/httpd/cert/chain.crt <Directory "网站根目录"> AllowOverride All # Allow open access: Require all granted </Directory> </VirtualHost>
4、http重定向https (httpd.conf末尾 )
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
标签:httpd,etc,centos7.9,ssl,cert,阿里,apache From: https://www.cnblogs.com/iwen1992/p/17663430.html