我通过社区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。
答案 0 :(得分:0)
sudo apachectl -f /etc/httpd-default/conf/httpd.conf -k graceful
这个命令解决了我的问题。