优雅地重启httpd,由Chef配置

时间:2015-01-30 09:23:40

标签: apache chef

我通过社区httpd食谱配置了httpd和Chef。

https://github.com/chef-cookbooks/httpd

httpd_service "default" do
    action [:create, :start]
end

执行上述代码后,sudo service httpd-default graceful会出现以下错误:

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 service httpd-default status说httpd正在运行。

如何手动优雅地重启httpd? 我的目标服务器是CentOS 6.6。

1 个答案:

答案 0 :(得分:0)

sudo apachectl -f /etc/httpd-default/conf/httpd.conf -k graceful

这个命令解决了我的问题。

相关问题