windows2003下APACHE2.2.8优化配置手记(一)

in 服务器类

原文地址:http://www.phpobject.net/blog/read.php?125
windows2003下APACHE2.2.8优化配置手记。

一、按照日期自定义apache日志

LogFormat “%v %l %u %t \”%r\” %>s %b” comonvhost
CustomLog   “|bin/rotatelogs.exe   -l   D:/apache/logs/access/%Y-%m-%d.log   86400″   common  
Errorlog “|bin/rotatelogs.exe   -l   D:/apache/logs/error/%Y-%m-%d.log   86400″


二、不能加载动态库的错误。

路径明显正确的情况下出现“PHP Warning:  PHP Startup: Unable to load dynamic library”。。原因是动态库有些是依赖其他的DLL的。解决方法
1 将这些依赖的dll拷贝到%windir%\system32下
2 或者将PHP5的安装目录添加到%PATH%中。

三、Apache与WinSock v2相冲突

在错误日志中看到

(OS 64)指定的网络名不再可用。  : winnt_accept: Asynchronous AcceptEx failed.

AcceptEx()是一个微软的WinSock2 API ,通过使用BSD风格的accept() API提供了性能改善。一些流行的Windows产品,比如防病毒软件或虚拟专用网络软件,会干扰AcceptEx()的正确操作。具体看apache手册关于Win32DisableAcceptEx 的说明。
解决方法:
在httpd.conf加上

Win32DisableAcceptEx # 禁止使用AcceptEx()

四、最大连接数
错误日志中提醒
Server ran out of threads to serve requests. Consider raising the ThreadsPerChild setting
很明显,把ThreadsPerChild设置的更大一点就可以了。

0 Comments

Leave a Reply

You must be logged in to post a comment.

Using Gravatars in the comments - get your own and be recognized!

XHTML: These are some of the tags you can use: <a href=""> <b> <blockquote> <code> <em> <i> <strike> <strong>