apache安装&优化-Windows
安装
准备
https://www.apachelounge.com/download/ 下载apache及jk
解压并配置httpd.conf 中的SRVROOT
这里需要 /

如果使用\ 启动报错如下

删除服务 
期间其他命令

优化
MPM参见 https://httpd.apache.org/docs/2.4/mod/mpm_winnt.html
开启 需要将 httpd.conf 中#Include conf/extra/httpd-mpm.conf 放开
mpm中有好多种mpm
Netware mpm_netware
OS/2 mpmt_os2
Unix prefork,worker 或 event,取决于平台特性
Windows mpm_winnt
其中win默认走WinNT,也可使用如下命令检测当前使用哪一种
D:\Apache24\bin>httpd.exe -l
Compiled in modules:
core.c
mod_win32.c
mpm_winnt.c
http_core.c
mod_so.c
This Multi-Processing Module (MPM) is the default for the Windows NT operating systems
WinNT MPM
ThreadsPerChild: constant number of worker threads in the server process
MaxConnectionsPerChild: maximum number of connections a server process serves
另外,可以通过查看Apache提供的server-status(状态报告)来验证当前所设置数值是否合理,在httpd.conf文件中做如下设置来打开它:
* # 首先需要加载mod_status模块
LoadModule status_module modules/mod_status.so
* # 然后设置访问的地址
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from all

浙公网安备 33010602011771号