我正在使用fabric 远程启动微型aws 服务器,安装git 和git 存储库,调整apache 配置,然后重新启动服务器。
如果在任何时候,从我发出的fabfile
sudo('service apache2 restart')
或run('sudo service apache2 restart')
停止然后启动,命令显然运行,我得到指示 apache 已启动的响应,例如
[ec2-184-73-1-113.compute-1.amazonaws.com] sudo: service apache2 start
[ec2-184-73-1-113.compute-1.amazonaws.com] out: * Starting web server apache2
[ec2-184-73-1-113.compute-1.amazonaws.com] out: ...done.
[ec2-184-73-1-113.compute-1.amazonaws.com] out:
但是,如果我尝试连接,连接会被拒绝,如果我 ssh 进入服务器并运行
sudo service apache2 status
它会显示“ Apache is NOT running
”
在 sshed 中,如果 run
sudo service apache start
,服务器已启动并且我可以连接。有没有其他人经历过这个?或者是否有人对我可以查看的位置、日志文件等有任何提示,以了解发生了什么。或apache2/error.log
中没有任何内容。syslog
auth.log
这没什么大不了的,我可以解决它。我只是不喜欢这种无声的失败。