我正在尝试运行一个执行一项操作的命令,以更新证书,然后重新加载 Apache。
为此,我正在运行以下命令:
sudo /home/ec2-user/letsencrypt/letsencrypt-auto --config
/home/ec2-user/letsencrypt/cert.ini certonly --debug
&& service httpd reload
这给了我以下信息:
Updating letsencrypt and virtual environment dependencies......
Requesting root privileges to run with virtualenv: /root/.local/share/letsencrypt/bin/letsencrypt --config /home/ec2-user/letsencrypt/secure_textinconfidence_com.ini certonly --debug
Version: 1.1-20080819
Version: 1.1-20080819
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at
/etc/letsencrypt/live/secure.textinconfidence.com/fullchain.pem.
Your cert will expire on 2016-05-03. To obtain a new version of the
certificate in the future, simply run Let's Encrypt again.
- If you like Let's Encrypt, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le
Reloading httpd: not reloading due to configuration syntax error
[FAILED]
但是,当我运行时:
sudo service httpd configtest
我得到:
Syntax OK
与证书续订结合使用时,我的命令有问题吗?
正如@chicks 所说,shell 正在解释 && 部分而没有 sudo 这样做:
对问题进行排序