11 2 Apache服务器 22 Apache的特性 口 Apache的主要特性 ■支持最新的HTTP协议和多种方式的 支持服务器端包含指令(SS) HTTP认证 支持安全 Socket层(SSL) ■支持基于文件的配置 集成代理服务器模块 支持基于和域名的虚拟网站配置 提供用户会话过程的跟踪 支持通用网关接口,支持PHP 支持第三方软件提供的功能模块,实 astER|、Pe、 JavaServlets等 现灵活扩展 支持服务器状态监控 ■支持服务器日志记录和日志格式自定 义设置 河南中医药大学/阮晓龙713938213680/http://inux.xg.hactcm.edu.cn/http://www.5lxueweb.cn
河南中医药大学 / 阮晓龙 / 13938213680 / http://linux.xg.hactcm.edu.cn / http://www.51xueweb.cn 2.Apache服务器 Apache的主要特性: ◼ 支持最新的HTTP协议和多种方式的 HTTP认证 ◼ 支持基于文件的配置 ◼ 支持基于IP和域名的虚拟网站配置 ◼ 支持通用网关接口 , 支 持 PHP 、 FastCGI、Perl、JavaServlets等 ◼ 支持服务器状态监控 ◼ 支持服务器日志记录和日志格式自定 义设置 ◼ 支持服务器端包含指令(SSI) ◼ 支持安全Socket层(SSL) ◼ 集成代理服务器模块 ◼ 提供用户会话过程的跟踪 ◼ 支持第三方软件提供的功能模块,实 现灵活扩展 11 2.2 Apache的特性
C▲不安全 helpd ansche cr 12 APACHE HttpsErvEr ProjEct HEO an opensource Http server for modem operating systems induding Unix ond Windows The gcal of this projecl is to prowide a secure emicerm and extensile server that provdes Http services in syne win the current Cepd)was launched in 1596 and c has boon t popular on the Internet s nce An It has celebrated ts 2sm birthday as a pro oct in February a pro ect ot Iho Apache Sotter Foundation he Apache Sofware Foundaton and the Apache Hi Project are pieased to 2.4.46aftheApacheHttpServeri"httpd') Ths latest release from the 24.x stable branch represents the best avalable wersion of Apache Http Hm24amw由的圆时n13opms111 Change oe for 24 1 Crowe chene oo lor 24 I New FeanrHg n mtnd 24 20180101 phe Apeche Http Dje has d soontrmed all development and parch review of the 22x Get nyce af the 22x nawor theough June of 2017, The tnal release 2.234 was punished in July 2017, and no further ewauadon df bug reports or secun ty nsks wll be considered cr published for 2.2 x reos We have updated our down osd page in an effort to beter utilze our de to prowide a et you ytr your usng PGP or MD6 signatures D Relaed Pre wr U D∠▲∠4 2016214下午5080
12
13 APACHE aphttpSerVerPr。JEcT Apache HT 务器24文档 nche2324的新包性 Raches可证 内容墙 里户人回达目边 参考手团 态共率对象sQ 反白代理置指商 译与安装 停止与重启 丛RL肤射到文性统 金快速整考 多处理块M 5LmLs加密 EBCDX系绝 行cG的用户切EXEC 志达析 礼改互气mde 它主题 Copynight 2020 The Apac 养成阅读官方文档的习惯,是最有效的学习途径
13 养成阅读官方文档的习惯,是最有效的学习途径
14 2 Apache服务器 2.3 Apache工作模式 口 Apache有 prefork、 worker、 event三种工作模式 ■ prefork工作模式 口 prefork是稳定的 Apache模式 ¤在启动之初就预先派生一些子进程,然后等待客户端的请求进来,用于减少频繁创建和销 毁进程的开销 口每个子进程只有一个线程,在一个时间点内,只能处理一个请求。 口但是将请求放进队列中,一直等到有可用进程,请求才会被处理,提高了延时。 口通常情况下, Apache具有很强的自我调节能力,不需要额外调整。 ¤但当需要处理的并发请求较高时,需要根据业务情况进行调优。 河南中医药大学/阮晓龙713938213680/http://inux.xg.hactcm.edu.cn/http://www.5lxueweb.cn
河南中医药大学 / 阮晓龙 / 13938213680 / http://linux.xg.hactcm.edu.cn / http://www.51xueweb.cn 2.Apache服务器 Apache有prefork、worker、event三种工作模式。 ◼ prefork工作模式 prefork是稳定的Apache模式。 在启动之初就预先派生一些子进程,然后等待客户端的请求进来,用于减少频繁创建和销 毁进程的开销。 每个子进程只有一个线程,在一个时间点内,只能处理一个请求。 但是将请求放进队列中,一直等到有可用进程,请求才会被处理,提高了延时。 通常情况下,Apache具有很强的自我调节能力,不需要额外调整。 但当需要处理的并发请求较高时,需要根据业务情况进行调优。 14 2.3 Apache工作模式
15 2 Apache服务器 2.3 Apache工作模式 口 Apache有 prefork、 worker、 event三种工作模式 ■ prefork工作模式 口通常情况下, Apache具有很强的自我调节能力,不需要额外调整。但当需要处理的并发 请求较高时,需要根据业务情况进行调优。 口 prefork下有 StartServers、 MinSpareServers、 MaxSpareServers、 MaxRequestWorkers四 个指令用于调节父进程如何产生子进程。 StartServers 初始的工作进程数 Min Spare servers 空闲子进程的最小数量 MaxSpareServers 空闲子进程的最大数量 MaxRequestWorkers最大空闲线程数 如:并发较高时,需要增加 MaxRequestWorkers的值,避免更多人排队。 内存较小时,需要减少 MaxRequestWorkersl的值,避免服务崩溃。 河南中医药大学/阮晓龙713938213680/http://inux.xg.hactcm.edu.cn/http://www.5lxueweb.cn
河南中医药大学 / 阮晓龙 / 13938213680 / http://linux.xg.hactcm.edu.cn / http://www.51xueweb.cn 2.Apache服务器 Apache有prefork、worker、event三种工作模式。 ◼ prefork工作模式 通常情况下,Apache具有很强的自我调节能力,不需要额外调整。但当需要处理的并发 请求较高时,需要根据业务情况进行调优。 prefork下有StartServers、MinSpareServers、MaxSpareServers、MaxRequestWorkers四 个指令用于调节父进程如何产生子进程。 ▪ StartServers 初始的工作进程数 ▪ MinSpareServers 空闲子进程的最小数量 ▪ MaxSpareServers 空闲子进程的最大数量 ▪ MaxRequestWorkers 最大空闲线程数 ▪ 如:并发较高时,需要增加MaxRequestWorkers的值,避免更多人排队。 ▪ 内存较小时,需要减少MaxRequestWorkers的值,避免服务崩溃。 15 2.3 Apache工作模式