您是否遵循了 Set up Let’s Encrypt with multiple domains / redirects 中的说明?
如果您在 OP 的模板中插入 www.mysite.com,它会生成此内容:
after_ssl:
# tell letsencrypt what additional certs to get
- replace:
filename: "/etc/runit/1.d/letsencrypt"
from: /--keylength/
to: "-d www.mysite.com --keylength"
- replace:
filename: "/etc/runit/1.d/letsencrypt"
from: /--fullchainpath/
to: "-d www.mysite.com --fullchainpath"
global: true
所以你是错的。