一绢掰、安裝certbot客戶端
wget https://dl.eff.org/certbot-auto
chmod a+x certbot-auto
二佳吞、生成證書
./certbot-auto certonly --standalone --email 郵箱地址 -d 域名1 -d 域名2 ...
三、查看生成的證書
tree /etc/letsencrypt/live/
四魔眨、apache配置文件 httpd-ssl.conf
<VirtualHost *:443>
DocumentRoot "路徑"
ServerName 域名
ServerAdmin 郵箱
ErrorLog "路徑/logs/error_log"
TransferLog "路徑/logs/access_log"
SSLEngine on
SSLCertificateFile "/etc/letsencrypt/live/證書域名/fullchain.pem"
SSLCertificateKeyFile "/etc/letsencrypt/live/證書域名/privkey.pem"
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory "路徑">
SetOutputFilter DEFLATE
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
DirectoryIndex index.html index.php
</Directory>
BrowserMatch "MSIE [2-5]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
CustomLog "路徑/logs/ssl_request_log" \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>
五媳维、證書續(xù)簽
Let’s Encrypt 生成的免費證書為3個月時間
./certbot-auto renew