zoukankan      html  css  js  c++  java
  • Httpd服务入门知识-Httpd服务常见配置案例之DSO( Dynamic Shared Object)加载动态模块配置

          Httpd服务入门知识-Httpd服务常见配置案例之DSO( Dynamic Shared Object)加载动态模块配置

                                                  作者:尹正杰

    版权声明:原创作品,谢绝转载!否则将追究法律责任。

    一.加载动态模块配置案例

    [root@node101.yinzhengjie.org.cn ~]# egrep -v "^ *#|^$" /etc/httpd/conf/httpd.conf | grep ServerRoot      #表示主配置文件中的服务器根路径为"/etc/httpd",若配置文件中使用了相对路径,则其相对路径是针对咱们这里定义的"/etc/httpd"而言的。
    ServerRoot "/etc/httpd"
    [root@node101.yinzhengjie.org.cn ~]#
    [root@node101.yinzhengjie.org.cn ~]# egrep -v "^ *#|^$" /etc/httpd/conf/httpd.conf | grep modules        #默认加载路径存放在"/etc/httpd/conf.modules.d/*.conf"
    Include conf.modules.d/*.conf
    [root@node101.yinzhengjie.org.cn ~]#
    [root@node101.yinzhengjie.org.cn ~]# ll /etc/httpd/conf.modules.d/                           #默认存放动态模块的配置文件位置
    total 28
    -rw-r--r-- 1 root root 3740 Dec 7 17:07 00-base.conf
    -rw-r--r-- 1 root root 139 Aug 6 21:44 00-dav.conf
    -rw-r--r-- 1 root root 41 Aug 6 21:44 00-lua.conf
    -rw-r--r-- 1 root root 742 Dec 7 16:03 00-mpm.conf
    -rw-r--r-- 1 root root 957 Aug 6 21:44 00-proxy.conf
    -rw-r--r-- 1 root root 88 Aug 6 21:44 00-systemd.conf
    -rw-r--r-- 1 root root 451 Aug 6 21:44 01-cgi.conf
    [root@node101.yinzhengjie.org.cn ~]# 
    [root@node101.yinzhengjie.org.cn ~]# grep auth_basic_module /etc/httpd/conf.modules.d/00-base.conf       #"auth_basic_module"是基本的身份验证的模块,默认是开启的,因为没有用"#"号注释掉,配置指定实现模块加载格式如下所示。
    LoadModule auth_basic_module modules/mod_auth_basic.so                                 #加载模块的指令使用的是LoadModule,加载模块的名称为"auth_basic_module",该模块在磁盘上存放的位置是"modules/mod_auth_basic.so"
    [root@node101.yinzhengjie.org.cn ~]# 
    [root@node101.yinzhengjie.org.cn ~]# ll /etc/httpd/modules/mod_auth_basic.so                    #根据上面指定的位置咱们的确可以找到该模块哟~
    -rwxr-xr-x 1 root root 15424 Aug 8 19:42 /etc/httpd/modules/mod_auth_basic.so
    [root@node101.yinzhengjie.org.cn ~]#
    [root@node101.yinzhengjie.org.cn ~]# httpd -M | grep basic                              #该动态模块已经被加载啦
     auth_basic_module (shared)
    [root@node101.yinzhengjie.org.cn ~]# 
    [root@node101.yinzhengjie.org.cn ~]# grep auth_basic_module /etc/httpd/conf.modules.d/00-base.conf       #禁用基本的身份验证模块,只需要在前面添加"#"号注释即可。
    #LoadModule auth_basic_module modules/mod_auth_basic.so
    [root@node101.yinzhengjie.org.cn ~]# 
    [root@node101.yinzhengjie.org.cn ~]# httpd -M | grep basic                              #动态模块被咱们禁用了
    [root@node101.yinzhengjie.org.cn ~]# 

    二.查看具体模块的帮助信息

    1>.如下图所示,点击"Module"(官网文档:http://httpd.apache.org/docs/2.4/)

    2>.选择指定模块的名称开头

    3>.比如查看auth_basic模块("http://httpd.apache.org/docs/2.4/mod/mod_auth_basic.html")

  • 相关阅读:
    xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!
    xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!
    xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!
    密码学-学习笔记
    让MySQL速度提升3倍的19种优化方式
    Oracle/云MySQL/MsSQL“大迁移”真相及最优方案
    tf.TFRecordReader()函数解析(最清晰的解释)
    Polkadot(波卡)简介
    Gavin Wood的故事:神级黄皮书、出走以太坊、乱世成名与三代区块链
    从设计哲学对比波卡与Cosmos
  • 原文地址:https://www.cnblogs.com/yinzhengjie/p/12001709.html
Copyright © 2011-2022 走看看