开发者社区> 问答> 正文

centos无法启动httpd服务

centos无法启动httpd服务

# systemctl start httpd
Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.

systemctl status httpd.service
httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
   Active: failed (Result: exit-code) since Wed 2015-04-15 17:28:43 CST; 26s ago
  Process: 1301 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS)
  Process: 1300 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND ( code=exited, status=1/FAILURE)
Main PID: 1300 (code=exited, status=1/FAILURE)


Apr 15 17:28:43 iZ94hj21pncZ systemd[1]: Starting The Apache HTTP Server...
Apr 15 17:28:43 iZ94hj21pncZ httpd[1300]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 10.169.141.134. Set ...is message
Apr 15 17:28:43 iZ94hj21pncZ httpd[1300]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
Apr 15 17:28:43 iZ94hj21pncZ httpd[1300]: no listening sockets available, shutting down
Apr 15 17:28:43 iZ94hj21pncZ httpd[1300]: AH00015: Unable to open logs
Apr 15 17:28:43 iZ94hj21pncZ systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Apr 15 17:28:43 iZ94hj21pncZ systemd[1]: Failed to start The Apache HTTP Server.
Apr 15 17:28:43 iZ94hj21pncZ systemd[1]: Unit httpd.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.


报错是无法启动apache的http  server
我现在主机装的是nginx,应该不用装apache才对吧
刚开始接触服务器,不太懂
求指教

展开
收起
misslost 2015-04-15 17:31:00 19204 0
4 条回答
写回答
取消 提交回答
  • 回 2楼(misslost) 的帖子
    apache在linux系列里面注册的服务名称叫httpd
    你已经用了nginx用在80端口上,但是apache默认也开了80端口,所以端口冲突了,造成apache无法使用。。
    你可以把apache的默认配置端口改为其他端口,然后nginx可以做反向代理到apache的端口,毕竟apache在执行php的效率上是比较高的,nginx在扛大并发上面是比较好的,取其所长嘛。。
    2015-05-10 17:17:31
    赞同 展开评论 打赏
  • Recentos无法启动httpd服务


    2015-05-10 15:29:48
    赞同 展开评论 打赏
  • 回1楼dongshan8的帖子
    对啊……
    那为什么我启动httpd服务,提示apache的问题呢
    是哪里配置没弄好吗
    80端口的nginx打开完全正常
    另外我没有安装apache
    2015-04-15 18:54:03
    赞同 展开评论 打赏
  • 旺旺:nectar2。
    楼主您好,

    如果您之前已经安装好了nginx,那它默认是使用80端口的。

    这种情况下,就不必另外安装使用apache了喔,即使安装了,在启动时,可能也会因为80端口已经被nginx使用中,而无法成功启动apache喔。

    祝您生活愉快。

    -------------------------

    回 2楼(misslost) 的帖子
    您好,

    在Linux发行版中,httpd服务,就是apache 的 httpd。

    一般我们口头中提到的apache(web),就是apache基金会的httpd项目喔。

    请参考:http://httpd.apache.org/
    2015-04-15 18:19:30
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
CentOS Nginx PHP JAVA 多语言镜像使用手 立即下载
CentOS Nginx PHP JAVA多语言镜像使用手册 立即下载
低代码开发师(初级)实战教程 立即下载