httpd: apr_sockaddr_info_get() failed for bogon

今天在测试apache安装,启动的时候报错:
[root@bogon bin]# ./apachectl start
httpd: apr_sockaddr_info_get() failed for bogon
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
这是因为主机名为bogon,因为不想去修改/etc/resolved.con文件,所以直接修改了apache的配置文件。
用记事本打开httpd.conf,将里面的#ServerName www.example.com:80 前的注释去掉即可。
再执行./apachectl start。然后可以通过浏览器访问http://192.168.56.130:80,如果页面显示“It works!”,即表示apache已安装并启动成功。
 
请使用浏览器的分享功能分享到微信等