11 2 Apache服务器 22 Apache的特性 口 Apache的主要特性 ■支持最新的HTTP协议和多种方式的 ■支持服务器端包含指令(SS|) HTTP认证 支持安全 Socket层(SSL) 支持基于文件的配置 集成代理服务器模块 支持基于P和域名的虚拟网站配置 提供用户会话过程的跟踪 支持通用网关接口,支持PHP、Fast 支持第三方软件提供的功能模块 CG|、Per、 Java Servlets等 实现灵活扩展 ■支持服务器状态监控 支持服务器日志记录和日志格式自 定义设置 南中医药大学/阮晓龙/13938213680/http://inux.xg.hactcm.edu.cn/http://www.51xueweb.cn
河南中医药大学 / 阮晓龙 / 13938213680 / http://linux.xg.hactcm.edu.cn / http://www.51xueweb.cn 2.Apache服务器 Apache的主要特性: ◼ 支持最新的HTTP协议和多种方式的 HTTP认证 ◼ 支持基于文件的配置 ◼ 支持基于IP和域名的虚拟网站配置 ◼ 支持通用网关接口,支持PHP、Fast CGI、Perl、JavaServlets等 ◼ 支持服务器状态监控 ◼ 支持服务器日志记录和日志格式自 定义设置 ◼ 支持服务器端包含指令(SSI) ◼ 支持安全Socket层(SSL) ◼ 集成代理服务器模块 ◼ 提供用户会话过程的跟踪 ◼ 支持第三方软件提供的功能模块, 实现灵活扩展 11 2.2 Apache的特性
)+× 02httpdapache.org m口↓≡ APACHE Http ServeR ProjecT The Apache HT oject s to prome a secure effcient and edenside server that prowdes hTtp sync wtn tme current Http standart EssEntials The Apache HT TP Server (mtpd)was launched in 1995 and it has been the most popular web server on the intemet since April 1996 It has celebrated ts 20th birthday as a project n February 2015 The Apache Http Server is a project of The Apache sOfware Frundaton d24.41 SAury Rend he Apache Sotware Foundaton and the Apache Http Server Project are pleased to announce the release af version 2 4.41 af the Apache Http Server Cmllpa) ce Repositories This latest release from the 2 4.x stabie branch represents the best available version of Apache HT Generallntormatan Apache hTtp Server version 2 4. 41 or newer s required n order to operate a Tls 1 3 web server wm openssl 1.1.1 Downnad I change 411 comolete changel on in24 1 New Features n nttm 24 Documentation Apachehttpd22End-of-life 01801-01 Inns deal AS previous a nced. the Apache serwer Pro ect has discontinued all development and patch the 22x senes of rele he Apache Http Server Prdect han bng comtec to provide maintenance af the 22 x nawor through June of 2017. The final release 22 34 was pushed in Jury 2017. and no further evaluation of bug reports or securty nsks wil be consdered or pushed Maung let Want to try out the Apache Http Server Great We have updaled our downing nge m an enact to betler titre We hope that by making i easier to use our mirrors, we wil be able to prowde a beter download eperience Subproject Please ensure that you yery your owninads using PGP or MD5 signatures Want to contribute to the Apache hTtp Server Awesome! Have a look at our current 'Hep Task the Acade Http Sert Prced woud txe help with Dimculty enact at sarv o c Improve the Reque 2016214下午71611 Miscellaneous 201627上午63105 controls Powered ey Help Y
12
Apache HT oahttpdapacheorg/docs/24 m口↓≡ APACHE 快|指金|组题本|站值 Http ServeR ProjeCT △ch>P图器>文挡 Apache Http服务器24文档 tr ja ko pehr r Googe理常 发行说耐 引教程 认征,权与访控制 Ane2122的面 定抗定地址与站囗 0ch20的性 丛22升级到24 Ahe许证 考手册 用户私人网站目prm 动态共字对象SQ 反向忙理说雪 详与安 日志文件 丛RL射到交件系 平台相关说 金快通使 包的系统( echallens Fedorak 多处理M 钙最全配置 ECDC惠统 行c的用已切换EC 表达式料灯器 虚拟主机 回题 开发攻档 励改团攻档 可用语喜 da de en e undation 养成阅读官方文档的习惯,是最有效的学习途径
13 养成阅读官方文档的习惯,是最有效的学习途径
2 Apache服务器 2.3 Apache工作模式 口 Apache有 prefork、 worker、 event三种工作模式 prefork工作模式 a prefork是稳定的 Apache模式。 口在启动之初就预先派生一些子进程,然后等待客户端的请求进来,用于减少频 繁创建和销毁进程的开销。 口每个子进程只有一个线程,在一个时间点内,只能处理一个请求。 口但是将请求放进队列中,一直等到有可用进程,请求才会被处理,提高了延时。 口通常情况下, Apache具有很强的自我调节能力,不需要额外调整。 ¤但当需要处理的并发请求较高时,需要根据业务情況进行调优。 南中医药大学/阮晓龙/13938213680/http://inux.xg.hactcm.edu.cn/http://www.51xueweb.cn
河南中医药大学 / 阮晓龙 / 13938213680 / http://linux.xg.hactcm.edu.cn / http://www.51xueweb.cn 2.Apache服务器 14 2.3 Apache工作模式 Apache有prefork、worker、event三种工作模式。 ◼ prefork工作模式 prefork是稳定的Apache模式。 在启动之初就预先派生一些子进程,然后等待客户端的请求进来,用于减少频 繁创建和销毁进程的开销。 每个子进程只有一个线程,在一个时间点内,只能处理一个请求。 但是将请求放进队列中,一直等到有可用进程,请求才会被处理,提高了延时。 通常情况下,Apache具有很强的自我调节能力,不需要额外调整。 但当需要处理的并发请求较高时,需要根据业务情况进行调优
5 2 Apache服务器 2.3 Apache工作模式 口 Apache有 prefork、 worker、 event三种工作模式 prefork工作模式 口通常情况下, Apache具有很强的自我调节能力,不需要额外调整。但当需要处 理的并发请求较高时,需要根据业务情况进行调优。 a prefork下有 StartServers、 MinSpare Servers、 MaxSpareServers MaxRequestWorkers四个指令用于调节父进程如何产生子进程。 Startservers 初始的工作进程数 Min Spare servers 空闲子进程的最小数量 MaxSpareServers 空闲子进程的最大数量 MaxRequestWorkers 最大空闲线程数 如:并发较高时,需要增加 MaxRequestWorkers的值,避免更多人排队。 内存较小时,需要减少 MaxRequestWorkers的值,避免服务崩溃。 南中医药大学/阮晓龙/13938213680/http://inux.xg.hactcm.edu.cn/http://www.51xueweb.cn
河南中医药大学 / 阮晓龙 / 13938213680 / http://linux.xg.hactcm.edu.cn / http://www.51xueweb.cn 2.Apache服务器 15 2.3 Apache工作模式 Apache有prefork、worker、event三种工作模式。 ◼ prefork工作模式 通常情况下,Apache具有很强的自我调节能力,不需要额外调整。但当需要处 理的并发请求较高时,需要根据业务情况进行调优。 prefork下有StartServers、MinSpareServers、MaxSpareServers、 MaxRequestWorkers四个指令用于调节父进程如何产生子进程。 ▪ StartServers 初始的工作进程数 ▪ MinSpareServers 空闲子进程的最小数量 ▪ MaxSpareServers 空闲子进程的最大数量 ▪ MaxRequestWorkers 最大空闲线程数 ▪ 如:并发较高时,需要增加MaxRequestWorkers的值,避免更多人排队。 ▪ 内存较小时,需要减少MaxRequestWorkers的值,避免服务崩溃