21 2 Apache服务器 2.2Apache Module ¤ Apache模块安裝后存放位置和模块的引用在 Ubuntu server16.04和 CentOs7中有所区别。 ¤在 Ubuntu server中已安裝模块存放在/etc/ apache2/mods- available目 录中,已启用模块存放在/etc/ apache2/mods- enabled目录中, Ubuntu server中模块的后缀名为Joad,且每一个模块对应一个.conf 文件 cenηtoS中模块存放在/usr/ib64/httpd/modules目录中CentOs中模 块的后缀名为50 河南中医药大学/阮晓龙/13938213680/http://linux.xg.hactcm.edu.cn/http:/www.51xueweb.cn
河南中医药大学 / 阮晓龙 / 13938213680 / http://linux.xg.hactcm.edu.cn / http://www.51xueweb.cn 2.Apache服务器 Apache模块安装后存放位置和模块的引用在Ubuntu Server 16.04和 CentOS 7中有所区别。 在Ubuntu Server中已安装模块存放在/etc/apache2/mods-available目 录中,已启用模块存放在/etc/apache2/mods-enabled目录中, Ubuntu Server中模块的后缀名为.load,且每一个模块对应一个.conf 文件。 CentOS中模块存放在/usr/lib64/httpd/modules目录中,CentOS中模 块的后缀名为.so。 21 2.2Apache Module
J211.69.35.213-centos7-teaCh-rootecentos7teache/usr/mb64/httpd/modules-xshell5(freeforhoMe/school) 文件)乘辑()查(工具①选项卡(B)囗W秘助(H)sh/root"21169.3521322 22 ·,國·6··8·A·:鹵田,,②”要加当前,左 1211621c0571+ [rootacentos7teachmodules]#cd/usr/1ib64/httpd/modules] 2 Apache jd acti [root@centos7teach modules]# od_dialup.so mod_proxy_express.so aPache Module mod dir. so mod_dumpioso mod_proxy_fdpassso mod allowmethod mod echo. so mod__proxy_ftp.so mod asis. so nv.so mod auth basic. so mod easi ve24.so proxy_scgi 50 mod_auth digest.s mod_expires.so mod_proxy.so mod authn anon. so mod- proxy_wstunnelso mod authn core. so e ca mod ratelimit. so mod authn dbd.so mod filter. so mod reflector. so od authn dbm. so mod headers. so mod authn file. so mod heartbeat. st mod_reqtimeoutso mod authn socache so mod heartmonitor so mod_request. so mod authz core. so mod inc lude. so mod_ authz dbd. so mod authz dbm. so modTbmethod bybusyness so mod_setenvifso mod_authz groupfile. so modlbmethod byrequests so mod-slotmemplainso mod authz host. so modlbmethod bytraffic so mod-slotmemshmse od authz owner. so lbmethod heartbeat se mod authz user. so mod_log_config.so mod socache memcache so mod autoindex. so mod buffer so dlogforensic.so mod_speling.so mod cache disk. so mod_logio. so mod_ status. so mod cache. so od lua. so mod_ cache_ socache so mod _macro. so mod_cgi.so mod_systemd. so mod_cgi.so mod mime.so mod data. so mod_mpm prefork.so mod userdir so mod_dav_ fs. so mod_mpmworker.so mod usertrack so mod day lock. so mod negotiation. so mod version. so mod day. so mod_ proxy- ajp.so mod vhost alias. so mod_watchdog. so [root@centos7teach modu les]#ixy_connect.so d deflate. so 仅相文本发送到图远项卡 河南中医药大学/阮晓龙/22 B SSH2 xterm T B0x40 s 37, 30 1 s
河南中医药大学 / 阮晓龙 / 13938213680 / http://linux.xg.hactcm.edu.cn / http://www.51xueweb.cn 2.Apache服务器 22 2.2Apache Module
J211.69.35.213-centos7-teaCh-rootecentos7teache/usr/mb64/httpd/modules-xshell5(freeforhoMe/school) 文件)乘辑()查(工具①选项卡(B)囗W秘助(H)sh/root"21169.3521322 23 ·,國·0··8·A:鹵团,,②”P要加当前,左 1216935213ce057L+ 2.Apache Listen: Allows you to bind Apache to specific IP addresses and /or aPache Module direst i vested of the default. See also the virtua Host> change this to Listen on specific IP addresses as shown below to prevent Apache from glomming onto all bound IP addresses # Listen12.34.56.78:80 Listen 80 #f To be able to use the functionality of a module which was built as a Dso you have to place corresponding LoadModule lines at this s location so th directives contained in it are actually available before they are used #staticallycompiledmodules(thoselistedbyhttpd-1)donotneed be loaded h Example LoadModule foo_module modu les/mod_foo. se 工 nc lude conf. modules.d/°.conf #Ifyouwishhttpdtorunasadifferentuserorgroupyoumust #httpdasrootinitiallyanditwillswitch #User/group:Thename(or#number)oftheuser/grouptorunhttpdas #工t sually good practice to create a dedicated user and group for #runninghttpdaswithmostsystemservices #Main server configuration The directives in this section set up the values used by the main 仅相文本发送到图远项卡 河南中医药大学/阮晓龙/22 ssH2 xterm T B0x40见40.301会舌4 LAP NU
河南中医药大学 / 阮晓龙 / 13938213680 / http://linux.xg.hactcm.edu.cn / http://www.51xueweb.cn 2.Apache服务器 23 2.2Apache Module
24 2 Apache服务器 2.2Apache Module ¤ Apache模块只与 Apache的版本有关,和操作系统无关。这里介绍 Apache246中常用的模块,如表4-1所示。 表41 Apache常用模块列表 模块名 功能说明 是否默认安装 mod actions 运行基于MME类型的cG脚本 mod alias 提供从文件系统的不同部分到文档树的映射 和URL重定向 mod asis 发送自己包含HTTP头内客的文件 mod auth basic 使用基本认证 mod auth digest 用MD5加密算法的用户验证 mod authn alias 允许使用第三方验证 是是是是否否否否 od authn_anon允许匿名用户访问认证的区域 mod authn abd 用数据库保存用户验证信息 mod authn dbm 使用DBM数据文件保存 mod_authn_default在未正确置认证模块的情兄下简单拒绝 切认证信息 河南中医药大学/阮晓龙/1393 L mod_authz_groupfile使用pam件进行组验证
河南中医药大学 / 阮晓龙 / 13938213680 / http://linux.xg.hactcm.edu.cn / http://www.51xueweb.cn 2.Apache服务器 Apache模块只与Apache的版本有关,和操作系统无关。这里介绍 Apache 2.4.6中常用的模块,如表4-1所示。 24 2.2Apache Module
25 mod authn file使用文本文件保存用户验证首息 2. Apache mod authnz ldap 允许使用一个LDAP目录存储用户名和密码 是否 数据库来执行基本认证和授权 2.2Apache Module mod authz host基于主机的组验证 mod authz user用户验证模块 是 mod autoindex 生成目录索引 是 mod cache 基于∪R键的內容动态缓中 mod 在非线程型 MPM(prefork)上提供对cG脚 本执行的支持 是 mod coid 在线程型MPM( worker)上用一个外部cG 守护进程执行cG|脚本 是 od dir 指定目录索引文件以及为目录提供尾斜杠” 重定向 是 mod eny 允许 Apache修改或青除传送到cG脚本和 ss页面的环境变里 是 mod example 一个很简单的 Apache模块AP演示模块 否 mod filte 过滤信息 是 mod imagemap 处理服务器端图像映射 是 mod include 解析HTM文件 仅限于在 Windows平台上实现lsAP扩展 m0使用三方模块进行D 河南中医药大学/阮晓龙/13938213680/http://linux.xg.hactcm.edu.cn/http:/www.51xueweb.cn
河南中医药大学 / 阮晓龙 / 13938213680 / http://linux.xg.hactcm.edu.cn / http://www.51xueweb.cn 2.Apache服务器 25 2.2Apache Module