×

lnmp使用ssl签名报sudo错误

lnmp站点ssl签名报sudo出错

mtsym mtsym 发表于2019-12-13 22:12:42 浏览4221 评论0

抢沙发发表评论

lnmp在使用let’s encrypt给站点添加ssl证书时使用的是acme.sh脚本,但是最新的脚本会生成生证书时报错It seems that you are using sudo,然后提供了一个链接https://github.com/Neilpang/acme.sh/wiki/sudo

内容如下

Do not use sudo if you cannot properly configure it.

Using sudo is not recommended. If not properly configured to not ask for password it may cause permission issues when running commands from the cronjob (like renew), resulting in some or all of your certificates not being renewed and eventually will expire.

Now, if you are completely sure of the issues and the possibilities with the usage of sudo and still want to use it, you can pass the –force parameter.

Remember: Using sudo is not recommended. You have the option to force it at your own risk. You have been warned.

就是不推荐使用sudo来执行,但是你要是执意使用,添加–force参数即可,直接找到lnmp编辑,在acme.sh加上–force如下所示就行

    echo "Starting create SSL Certificate use Let's Encrypt..."
    /usr/local/acme.sh/acme.sh --force --issue ${letsdomain} -w ${vhostdir} --reloadcmd "/etc/init.d/nginx reload"

群贤毕至

访客