今天在部署环境的时候,重启apache的时候出现了报错
root@spwh:/mnt# service apache2 restart
* Restarting web server apache2 AH00557: apache2: apr_sockaddr_info_get() failed for spwh
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
[ OK ]
虽然并不影响使用,但是强迫症,心里不舒服
检查了/etc/hosts
正常
检查了域名的配置文件
正常
最后找出了问题
vi /etc/apache2/apache2.conf
在这个文件里加一行
ServerName IPaddress(自己的IP地址)
保存退出,重启apache
正常了。