Apache2 启动失败

Apache2 启动失败

大家好,希望大家能帮助我。我的问题是 apache 2 无法运行,尽管我写了命令service apache2 start/etc/init.d/apache2 restart

当我进入 localhost 时我看到了这个

在此处输入图片描述

他在终端上给了我这个:

 * Restarting web server apache2                                                AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 0.0.0.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

答案1

端口 80 已被 lighttpd 网络服务器使用。(netstat -an | grep :80)

停止 lighttpd:

/etc/init.d/lighttpd stop

或者

service lighttpd stop

查看 lighttpd 进程是否正在运行:

ps -ef |grep "lighttpd"

如果是,则手动终止

kill -9 Process_ID

启动 apache2

/etc/init.d/apache2 start

或者

service apache2 start

相关内容