检查apache配置文件 httpd -t

httpd -t
报错:
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

问题原因:没有在/etc/httpd/conf/httpd.conf中设定ServerName。所以apache会用主机上的名称来取代,首先会去找/etc/hosts中有没有主机的定义。

vim httpd.conf
ServerName www.example.com:80 去掉注释#

猜你喜欢

转载自blog.csdn.net/Haka36/article/details/86490175
今日推荐