原文地址:http://www.phpobject.net/blog/read.php?125
windows2003下APACHE2.2.8优化配置手记。
一、按照日期自定义apache日志
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相冲突
在错误日志中看到
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设置的更大一点就可以了。