日期:2014-05-17  浏览次数:20816 次

apache配置详解释

  • ServerRoot?"/etc/httpd" ?(设置服务器根目录
  • ?
  • PidFile?run/httpd.pid ?(Apache运行时使用的PidFile 的路径
  • ?
  • Timeout?120 ?(若120 秒后没有收到或送出任何数据就切断该连接
  • ?
  • KeepAlive?Off ?(不使用保持连接的功能
  • ?
  • MaxKeepAliveRequests?100 (在使用保持连接时,客户一次请求连接能响应文件的最大上限 )?
  • ?
  • KeepAliveTimeout?15 ?(在使用保持连接时,两个相邻的连接的时间间隔超过15 秒,就切断连接
  • ?
  • ?
  • < IfModule ?prefork.c > ?(设置使用prefork MPM 运行方式的参数
  • StartServers???????8 (设置服务器启动时运行的进程数
  • MinSpareServers????5 (在运行时会根据负载的轻重自动调整空闲子进程的数目 )?
  • MaxSpareServers???20 (若存在高于20 个空闲子进程,就创建逐一删除子进程
  • ServerLimit??????256 (apache的连接数限制 )?
  • MaxClients???????256 (限制同一时间的连接数不能超过256
  • MaxRequestsPerChild??4000(限制每个子进程在结束处理请求之前能处理的连接请求为4000 ) ?
  • </ IfModule > ?
  • ?
  • < IfModule ?worker.c > ?(设置使用worker MPM 运行方式的参数
  • StartServers?????????2 ?
  • MaxClients?????????150 ?
  • MinSpareThreads?????25 ?
  • MaxSpareThreads?????75? ?
  • ThreadsPerChild?????25 ?
  • MaxRequestsPerChild??0 ?
  • </ IfModule > ?
  • ?
  • Listen?80 ?(设置服务器的监听端口