完美解决 httpd not running, trying to start 和Not Found The requested URL was not found on this server问题

目录

一、问题:

二、原因:

三、解决方法:

四、拓展:


一、问题:

使用 /usr/local/apache2/bin/apachectl graceful/usr/local/apache2/bin/apachectl  start 命令时出现如下问题:

httpd not running, trying to start

(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

完美解决 httpd not running, trying to start 和Not Found The requested URL was not found on this server问题_第1张图片

访问时候出现

 完美解决 httpd not running, trying to start 和Not Found The requested URL was not found on this server问题_第2张图片

二、原因:

httpd服务启动,占用80端口

三、解决方法:

先安装psmisc。

yum install psmisc

杀死httpd 

killall -9 httpd

检查配置

/usr/local/apache2/bin/apachectl graceful

启动

/usr/local/apache2/bin/apachectl  start

 

没有报错,访问ip地址+/www/abc即可

192.168.10.118/www/abc

成功页面: 

完美解决 httpd not running, trying to start 和Not Found The requested URL was not found on this server问题_第3张图片

成功啦~

四、拓展:

Apache常用命令

#/usr/local/apache2/bin/apachectl -M                            #查看常见的模块(包括动态和静态)

#/usr/local/apache2/bin/apachectl -l                                  #查看加载的静态模块

#/usr/local/apache2/bin/apachectl -t                                  #检查配置文件有无语法错误

#/usr/local/apache2/bin/apachectl graceful                        #加载配置文件,但不重启

#/usr/local/apache2/bin/apachectl start/restart/stop          #启动/重启/停止Apache服务

 

你可能感兴趣的:(#,问题解决,apache)