Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache 由Chef配置的httpd的优雅重启_Apache_Chef Infra - Fatal编程技术网

Apache 由Chef配置的httpd的优雅重启

Apache 由Chef配置的httpd的优雅重启,apache,chef-infra,Apache,Chef Infra,我通过社区httpd菜谱与Chef配置了httpd 执行上述代码后,sudo服务httpd default会出现以下错误: httpd: apr_sockaddr_info_get() failed for web01 httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName httpd not running, trying to st

我通过社区httpd菜谱与Chef配置了httpd

执行上述代码后,sudo服务httpd default会出现以下错误:

httpd: apr_sockaddr_info_get() failed for web01
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
httpd not running, trying to start
(98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
sudo服务httpd默认状态表示httpd正在运行

如何手动重新启动httpd? 我的目标服务器是CentOS 6.6

sudo apachectl -f /etc/httpd-default/conf/httpd.conf -k graceful
此命令解决了我的问题。

是否设置了fqdn?运行hostname-f,看看您得到了什么。hostname-f输出hostname:Unknown host,但我认为这是另一回事。
sudo apachectl -f /etc/httpd-default/conf/httpd.conf -k graceful