还是MAIL服务器,重启apache 时出现报错:

httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

我用PS看了一下进程,发现进程已经开启。

ps -ef | grep httpd

root      3244     1  0 11:24 ?        00:00:00 /usr/local/apache2/bin/httpd -k restart
vuser     3264  3244  0 11:25 ?        00:00:00 /usr/local/apache2/bin/httpd -k restart
vuser     3265  3244  0 11:25 ?        00:00:00 /usr/local/apache2/bin/httpd -k restart
vuser     3266  3244  0 11:25 ?        00:00:00 /usr/local/apache2/bin/httpd -k restart
vuser     3267  3244  0 11:25 ?        00:00:00 /usr/local/apache2/bin/httpd -k restart
vuser     3268  3244  0 11:25 ?        00:00:00 /usr/local/apache2/bin/httpd -k restart
 

网上找了一下方法,现在稍微总结下
解决方法一:修改 /etc/hosts

加入如下行:

192.168.1.X  hostname

修改之后报错依旧,此方法有疑问,未能解决问题。

解决方法二:

是因为DNS没配置好. 如果不想配置DNS, 就在httpd.conf , 在配置文件中加入 如下行

ServerName localhost:80 

使用此方法重启APACHE不报错,问题解决。

 

网上最后有这么一句解释:

其实这个问题,解决的方法就是补充中的一句话,修改httpd.conf中的ServerName IP:port与Listen IP:端口一致就OK了。

这个解释我做过测试,没啥问题,APACHE 报错的问题已经解决。