运行此命令时出现错误
sudo service apache2 start
这是错误
* Starting web server apache2
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 this message
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
*
* The apache2 instance did not start within 20 seconds. Please read the log files to discover problems
有人可以帮忙吗?
答案1
有其他程序正在运行并使用端口 80。它可能是另一个 Web 服务器(如 nginx)或另一个正在运行的 apache 实例……甚至可能是 skype。
您可以使用以下命令查看正在使用端口 80 的内容:
netstat -tulpn | grep :80