certbot免費(fèi)ssl證書

一、安裝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 生成的免費(fèi)證書為3個(gè)月時(shí)間

./certbot-auto renew
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容