httpd未启动

时间:2016-04-14 16:22:50

标签: linux apache

我是root,我无法启动httpd。

我执行了/etc/init.d/httpd status并得到了:

  

httpd已停止

当我尝试/etc/init.d/httpd start时,我得到:

  

启动httpd:(98)地址已在使用中:make_sock:无法绑定到地址0.0.0.0:80
  没有可用的监听插座,关闭
  无法打开日志
                                                            [FAILED]

我认为它可能已挂起所以我检查了sudo netstat -tulpn | grep :80

我一无所获。

我检查了/var/log/httpd/error.log,它与

没有任何关系

试试看,我试过/etc/init.d/httpd reload 我得到[FAILED]

我需要做什么?

3 个答案:

答案 0 :(得分:0)

grep进程并杀死它们。然后尝试重启apache。这可能会解决您的问题。

ps -ef | grep httpd

kill -9 <PID>

答案 1 :(得分:0)

首先,我们需要找出占用端口80的服务

class AboutBox extends Component {
  static defaultProps = {
    title: 'Undefined Product',
  }
  constructor() {
    super();
    console.log(this.props.title); //this fails (=> null)
  }
  render() {
    console.log(this.props.title); //this works (=> 'Undefined Product')
    return null;
  }
}

使用此cmd,您将学习该服务,如果它不是您想要的服务,则启动您的httpd(apache)服务。

对于我的服务器,它的nginx不是apache,而cmd的响应是这样的:

netstat -anp |grep LISTEN |grep ":80"

表示pid:10266(nginx)正在使用端口80

答案 2 :(得分:0)

确保&#34;听PORT&#34;在配置文件中配置

我的意思是你不能有两行

Listen 80
你的httpd.conf文件中的

(或httpd.conf中的一个Listen 80和welcome.conf中的一个另一个配置文件)