报错apachectl -t

httpd: apr_sockaddr_info_get() failed for www
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
Syntax OK

 

解决办法1

vim /usr/local/apache2/conf/httpd.conf
ServerName www.example.com:80
ServerName localhost:80

 

解决办法2

vim /etc/hosts
# 127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
127.0.0.1 localhost.localdomain localhost www
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

把原来的注释掉,加一行新的,最后的www是主机名

 

posted @ 2015-12-06 11:11  dennyLinux  阅读(380)  评论(0编辑  收藏  举报