昨天在執行 Webinoly 的 SSL 更新語法 sudo site -ssl=renew
時,出現了以下錯誤:
Attempting to renew cert (huanyichuang.com) from /path/to/renewal/huanyichuang.com.conf produced an unexpected error: Missing command line flag or config entry for this setting: Select the webroot for huanyichuang.com: Choices: ['Enter a new webroot', '/path/to/webroot/'] (You can set this with the --webroot-path flag). Skipping.
後來上網找到這篇討論,暫時先透過手動的方式解決這個問題。
進一步了解後,發現是組態檔 /path/to/renewal/huanyichuang.com.conf
中的問題:
[renewalparams] account = {{account}} must_staple = True authenticator = webroot webroot = /path/to/webroot/ server = https://acme-v02.api.letsencrypt.org/directory [[webroot_map]] huanyichuang.com = /path/to/webroot/
根據這篇討論,應該要透過下方 [[webroot_map]]
來比對網站的根目錄,因此看起來 [renewalparams]
中的 webroot
屬性是造成的錯誤的來源。將之刪除後,重新執行 sudo site -ssl=renew
便沒有出現錯誤訊息了。
發佈留言