#环境问题#
一,报错原因
Jan 14 08:39:19 kali apachectl[209053]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress t>
Jan 14 08:39:19 kali apachectl[209053]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Jan 14 08:39:19 kali apachectl[209053]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
Jan 14 08:39:19 kali apachectl[209053]: no listening sockets available, shutting down
Jan 14 08:39:19 kali apachectl[209053]: AH00015: Unable to open logs
二,报错原因分析及解决
1,Jan 14 08:39:19 kali apachectl[209053]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress t>
修改配置文件,在 /etc/apache2/apche2.conf 文件中加入 ServerName 127.0.0.1
2,Jan 14 08:39:19 kali apachectl[209053]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Jan 14 08:39:19 kali apachectl[209053]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
端口被占用,可以kill掉当前使用80端口的进程
使用命令行查看当前使用80端口的进程
netstat -lnp|grep 80
查找后,使用kill pid(pid根据实际情况修改),比如途中就是59476端口
解决之后,systemctl start apache2 就可以啦