防止apache释放端口80

时间:2014-05-07 12:59:49

标签: mysql apache wamp wampserver

我在Windows 7 - 64位上安装了WAMP2.4。它的工作正常,我也可以从localhost和外部连接它。系统上未安装Skype,IIS或VMware。在 "服务" mysql和apache都设置为自动启动并处于启动状态。 WAMP的所有服务都在工作,图标为绿色。

现在问题是,网站经常出现问题。当它关闭时,WAMP图标仍然是绿色,mysql和apache仍然在"启动"州。然后我点击"重启所有服务"每次都开始工作。

当它失效时,我检查了"测试端口80" Apache>服务,它说没有使用该端口。同时当我用#34; netstat"检查端口80时在命令提示符下,它显示apache的进程ID。如果我不采取任何行动,一段时间后它就会开始工作。有没有办法让Apache不要释放端口80?或者,检查端口80的任何批处理命令及其是否空闲,重新启动wamp服务?

1 个答案:

答案 0 :(得分:1)

在此之前我已经听说过这个问题了。

尝试将这两个参数添加到httpd.conf文件中。

将它们放在httpd.conf # EnableSendfile on

中应该已存在的这一行之后
# AcceptFilter: Windows, none uses accept () instead of AcceptEx ()
# And do not recycle sockets between connections. This is useful
# Network interfaces for which the pilot is defective, and for
# Some network providers like vpn pilots or filters
# Anti-spam, anti-virus or anti-spyware.
AcceptFilter http none
AcceptFilter https none

幸运的是,这应该阻止Apache挂起,我认为这是你的主要问题。

相关问题