启动Apache失败(无法绑定解决0.0.0.0:80) [英] Starting apache fails (could not bind to address 0.0.0.0:80)

查看:3166
本文介绍了启动Apache失败(无法绑定解决0.0.0.0:80)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新:已经固定,看来的VirtualHosts配置文件中的一个是错误的启用站点 -

Update: Already fixed, it seems that one of VirtualHosts configurations files was wrong in sites-enabled.

我的Ubuntu 11.10

I have Ubuntu 11.10

当我运行命令来启动Apache2:

When I run the command to start apache2:

sudo /etc/init.d/apache2 start

我收到以下错误信息:

I get the following error message:

启动Web服务器的Apache2结果
  apache2的:无法可靠地确定了服务器的完全合格
  域名,使用127.0.1.1对于ServerName(98)地址已在
  使用方法:make_sock:无法绑定解决0.0.0.0:80没有听
  插座可用,关停无法打开日志行动'开始'
  失败了。

Starting web server apache2
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs Action 'start' failed.

我为了让进程正在使用的端口80上运行此命令:

I run this command in order to get the process that is using the port 80:

sudo netstat -ltnp | grep ':80'

它返回的输出:

tcp6       0      0 :::80                   :::*                    LISTEN      1176/

要知道是哪个进程运行此命令:

To know which process is I run this command:

ps -wlp1176

返回:

F S   UID   PID  PPID  C PRI  NI ADDR SZ WCHAN  TTY          TIME CMD
5 D    33  1176     1  0  80   0 -     0 exit   ?        00:00:00 apache2

但是,如果我试图杀掉该进程:

But if I try to kill the process:

sudo kill -9 1176

它不会杀死它,如果我再次运行netstat命令仍然出现听力和apache启动失败。

It doesn't kill it, if I run again the netstat command still appears listening and apache start fails.

有什么建议?

推荐答案

为我工作运行此命令:

fuser -k -n tcp 80

这篇关于启动Apache失败(无法绑定解决0.0.0.0:80)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆