zoukankan      html  css  js  c++  java
  • Httpd服务入门知识-Httpd服务常见配置案例之ServerSignature指令选项

              Httpd服务入门知识-Httpd服务常见配置案例之ServerSignature指令选项

                                                    作者:尹正杰

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

    一.ServerSignature指令概述

      当客户请求的网页并不存在时,服务器将产生错误文档,缺省情况下由于打开了 ServerSignature选项,错误文档的最后一行将包含服务器的名字、Apache的版本等信息
    
      如果不对外显示这些信息,就可以将这个参数设置为Off
    
      设置为Email,将显示ServerAdmin 的Email提示

    1>.故意访问一个不存在的网页(我们发现httpd 2.4版本不会暴漏服务器名称或者版本信息)

    2>.查看ServerSignature指令信息(httpd 2.4版本默认是off因此生产环境我们不需要修改啦~)

      博主推荐阅读:
        http://httpd.apache.org/docs/2.4/mod/core.html#serversignature

    二.ServerSignature案例

    1>.为了达到ServerSignature的演示效果,我们将ServerSignature的值设置为ON,但生产环境建议设置成off,如果你用的版本是httpd 2.4版本的话就无需设置了,因为默认就是off

    [root@node101.yinzhengjie.org.cn ~]# egrep -v "^ *#|^$" /etc/httpd/conf/httpd.conf  | grep ServerRoot
    ServerRoot "/etc/httpd"
    [root@node101.yinzhengjie.org.cn ~]# 
    [root@node101.yinzhengjie.org.cn ~]# egrep -v "^ *#|^$" /etc/httpd/conf/httpd.conf  | grep IncludeOptional
    IncludeOptional conf.d/*.conf
    [root@node101.yinzhengjie.org.cn ~]# 
    [root@node101.yinzhengjie.org.cn ~]# cat /etc/httpd/conf.d/serverSignature.conf 
    ServerSignature On
    [root@node101.yinzhengjie.org.cn ~]# 
    [root@node101.yinzhengjie.org.cn ~]# httpd -t
    Syntax OK
    [root@node101.yinzhengjie.org.cn ~]# 
    [root@node101.yinzhengjie.org.cn ~]# systemctl reload httpd
    [root@node101.yinzhengjie.org.cn ~]# 

    2>.访问不存在页面测试

  • 相关阅读:
    高效沟通
    Oracle播放多条 INSERT ALL
    oracle的同义词总结
    Brute force Attack
    爱因斯坦方程与小黑洞
    dom 编程(html和xml)
    dexposed框架Android在线热修复
    从微软小冰看微软运营手段的转型
    剑指offer_面试题_从上往下打印二叉树
    外面的wifi非常精彩,外面的wifi非常不安
  • 原文地址:https://www.cnblogs.com/yinzhengjie/p/12006441.html
Copyright © 2011-2022 走看看