我正在尝试安装 apache2,我遇到了这个问题。给我一些解决方案
重新启动 Web 服务器 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.
[fail]
* The apache2 instance did not start within 20 seconds. Please read the log files to discover problems
Run Code Online (Sandbox Code Playgroud)
小智 8
跑
sudo netstat -tulpn | grep :80
Run Code Online (Sandbox Code Playgroud)
你会得到类似的输出
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1066/lighttpd
Run Code Online (Sandbox Code Playgroud)
注意监听端口的进程的pid,在我的例子中是1066。然后运行
sudo kill -9 1066
Run Code Online (Sandbox Code Playgroud)
记得把pid改成监听端口的,可能和1066不一样
小智 2
您在什么类型的服务器上运行它?
解决第一个错误
AH00558:apache2:无法可靠地确定服务器的完全限定域名(使用 127.0.1.1)。全局设置“ServerName”指令以抑制此消息
您需要编辑httpd.conf文件,添加以下行:
ServerName localhost
Run Code Online (Sandbox Code Playgroud)
要解决其他错误,您应该确保尝试使用 root 权限运行 Apache。
sudo /usr/sbin/apachectl start
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
73963 次 |
| 最近记录: |