AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 754984
Accepted
williamsdb
williamsdb
Asked: 2016-02-10 05:34:10 +0800 CST2016-02-10 05:34:10 +0800 CST 2016-02-10 05:34:10 +0800 CST

httpd reload 作为 bash 中的第二个命令失败

  • 772

我正在尝试运行一个执行一项操作的命令,以更新证书,然后重新加载 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

与证书续订结合使用时,我的命令有问题吗?

apache-2.2
  • 1 1 个回答
  • 625 Views

1 个回答

  • Voted
  1. Best Answer
    williamsdb
    2016-02-11T00:32:10+08:002016-02-11T00:32:10+08:00

    正如@chicks 所说,shell 正在解释 && 部分而没有 sudo 这样做:

    sudo /home/ec2-user/letsencrypt/letsencrypt-auto --config 
    /home/ec2-user/letsencrypt/cert.ini certonly --debug 
    && sudo service httpd reload
    

    对问题进行排序

    • 3

相关问题

  • Apache Django Mod_Wsgi - 自动重新加载应用程序

  • Apache:对多个虚拟主机使用相同的目录指令

  • Apache 上的子域不工作 - 找不到服务器

  • PHP 作为 CGI 还是 Apache 模块?

  • 避免将某些丢失的文件记录到 Apache2 错误日志中

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve