总结在配置及启动apache2时出现报错的处理方法
启动apache遇到错误:
[root@python ~]# service apache2.4 start
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::6d3:c949:61aa:17b4. Set the 'ServerName' directive globally to suppress this message
进入apache的安装目录,打开配置文件:
[root@python ~]# vim /usr/local/apache2.4/conf/httpd.conf
搜索"#ServerName",添加ServerName localhost:80
重启报错:
apache2 address already in use:make_sock:could not bind to address [::]:80
- 此错误为端口被占用,只有进入root用户,才可以查看所有端口被占用的情况。
#netstat -lnp | grep 80
tcp 0 x x.x.x.x:8084 ... listen 1167/mono
tcp 0 x x.x.x.x:80 ... listen 1194/inetd
udp 0 x x.x.x.x:2080 ... listen 14427/drcomauthsvr
查看知道是Inetd占用了80端口
#kill 1194
#exit //退出root用户
$sudo apapche2ctl -k start
启动成功!