ref: https://www.snel.com/support/install-lets-encrypt-centos-7/
安裝第三方套件軟體
sudo yum install epel-release mod_ssl certbot
sudo yum install python-certbot-apache
!!! 注意 不能使用virtual host,如果使用,那憑證會很難取得 !! (建議重裝一個沒有virtual host的新的虛擬機,或是要改掉所有文件包括:/etc/httpd/conf.d/vhost.conf)
ipv6 會搶IP,所以開分享要注意,要一個一個去https://dynv6.com/用domain name
申請IPV6的憑證
certbot certonly --webroot -w /var/www/html -d chungyen.dns.army --email s110910541@student.nqu.edu.tw --agree-tos # certbot certonly --webroot -w location_file -d domain_name --email email --agree-tos
# 也可以使用下面的這個簡短指令
certbot --apache -d chungyen.dns.army # certbot --apache -d domain name
自動更新憑證
crontab 設定: MIN HOUR DOM MON DOW CMD,可以參考: 排程設定
certbot renew
crontab -e
0 0 * * 1 /usr/bin/certbot renew >> /var/log/sslrenew.log # 每周日0點0分更新
reference: https://disp.cc/b/KnucklesNote/czOq
TypeError: __str__ returned non-string (type Error)
更新 openssl
yum update ca-certificates openssl