我正在创建一个为nginx创建自签名证书的cookbook,并希望使用certbot cookbook来覆盖letsencrypt证书的自签名证书:
# Create self signed certificate
acme_selfsigned 'timber.com' do
crt '/etc/letsencrypt/live/timber.com/cert.pem'
chain '/etc/letsencrypt/live/timber.com/chain.pem'
key '/etc/letsencrypt/live/timber.com/privkey.pem'
end
# Create letsencrypt cert
certbot_certonly_webroot 'timber.com' do
webroot_path '/home_page/'
email 'lumber@timber.com'
domains ['timber.com']
retries 5
retry_delay 240
notifies :restart, resources(:service => "nginx")
agree_tos true
end
nginx自签名网站正确显示,但cerbot不会覆盖现有的自签名证书:
/etc/letsencrypt/live/timber.com/
而是在第二个证书:
/etc/letsencrypt/live/timber.com-0001/
有没有人知道替换/覆盖原始证书的方法?