启动apache一直出现错误
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了启动apache一直出现错误相关的知识,希望对你有一定的参考价值。
The Apache service named
reported the following error: >>>
AH00526: Syntax error on line 359 of F:/phptools/Apache2.4/Apache24/conf/httpd.conf:
原因一:80端口占用例如IIS,另外就是迅雷。我的apache服务器就是被迅雷害得无法启用!
原因二:软件冲突装了某些软件会使apache无法启动如Dr.com 你打开网络连接->TcpIp属性->高级->WINS标签把netbios的lmhosts对勾去掉,禁用tcp/ip的netbios. 然后再启动应该就可以了。
原因三:httpd.conf配置错误如果apache的配置文件httpd.conf搞错了,在windows里启动它,会提示the requested operation has failed,这是比较郁闷的事,因为查错要看个半天。其实可以用命令行模式启动apache,并带上参数,apache会提示你哪句有误,然后就可以针对性的解决。
检查错误方法;
如果是端口占用(提示:(OS 10048)通常每个套接字地址(协议/网络地址/端口)只允许使用一次。),先退出Apache,在httpd.conf中搜索Listen 80 ,将80改成8080或者别的端口号,重新运行一下Apache,这下应该能够启动了.
cgi- bin有一个空格,把空格去掉
ScriptAlias /cgi-bin/ "E:/phptools/ApacheServer/Apache24/cgi-bin/" 参考技术B 你的问题解决了么?我现在也遇到同样的问题了。 参考技术C 吧两个引号去掉。
PHP Apache shutdown unexpectedly启动错误解释及解决的方法
在学PHP的时候,偶然发现XAMPP窗体Apache的启动出现错误,出现下面的错误提示:
9:52:41 [Apache] Attempting to start Apache app...
9:52:41 [Apache] Status change detected: running9:52:42 [Apache] Status change detected: stopped
9:52:42 [Apache] Error: Apache shutdown unexpectedly.
9:52:42 [Apache] This may be due to a blocked port, missing dependencies,
9:52:42 [Apache] improper privileges, a crash, or a shutdown by another method.
9:52:42 [Apache] Check the "/xampp/apache/logs/error.log" file
9:52:42 [Apache] and the Windows Event Viewer for more clues
cmd 通过执行apache/bin/httpd.exe 打印例如以下log:
(OS 10048)通常每一个套接字地址(协议/网络地址/port)仅仅同意使用一次。 : make_sock: could not bind to address 0.0.0.0:443
或者后面是80port被占用
(OS 10048)通常每一个套接字地址(协议/网络地址/port)仅仅同意使用一次。
: make_sock: could not bind to address 0.0.0.0:80 或[ : : ]:80
一、最快的处理方法就是改动port号:
1、443port被占用。apache无法监听443port,该怎样解决呢?
在/xampp/apache/conf/extra/httpd-ssl.conf
把Listen 443 改动为 444(可自己定义)
2、80port被占用,apache无法监听80port。该怎样解决呢?
在/xampp/apache/conf/extra/httpd.conf
把Listen 80 改动为 88 (可自己定义)
假设配置了vhosts的话请把httpd-vhosts.conf 中port改为88(同上port号)
二、最直接的方法是关闭占用80、443port的进程:
1. 通过cmd中netstat -ano 看看本机80、 443port被占用没 ----- --这里 可能会被其它程序占用如iis、虚拟机等
2.通过cmd中打印tasklist,查找占用80、443port的进程名称。
3.taskkill /pid port号 杀掉此进程名称。XAMPP重新启动apache就可以。
综上所述第一种方法推荐使用,另外一种每次启动都或多或少的再次遇到。
以上是关于启动apache一直出现错误的主要内容,如果未能解决你的问题,请参考以下文章