zoukankan      html  css  js  c++  java
  • 禁掉Apache web server签名 How to turn off server signature on Apache web server

    有的时候,我们为了从安全角度考虑,防止黑客恶意攻击,我们会隐藏掉server信息,比如,一般我们会发现如下信息。
    这里写图片描述

    我用的是centos (fedora, RHEL也一样)

    $ sudo vi /etc/httpd/conf/httpd.conf 

    其他的系统(ubuntu, Debian)

    $ sudo vi /etc/apache2/apache2.conf 

    我们可以在这个文件中添加两行信息

    ServerSignature Off //隐藏Apache版本信息
    ServerTokens Prod//第一条命令虽然不会在页面上直接显示,但在response的头部还会包含,所以加上此条。

    然后再重启网络

    $ sudo service apache2 restart (Debian, Ubuntu or Linux Mint)
    $ sudo service httpd restart (CentOS/RHEL 6)
    $ sudo systemctl restart httpd.service (Fedora, CentOS/RHEL 7, Arch Linux) 

    即可解决该问题。

    具体参见:
    http://ask.xmodulo.com/turn-off-server-signature-apache-web-server.html

    shell脚本参见:
    http://write.blog.csdn.net/mdeditor#!postId=47006651

  • 相关阅读:
    洛谷
    洛谷
    洛谷
    洛谷
    洛谷
    模板
    模板
    模板
    洛谷
    模板
  • 原文地址:https://www.cnblogs.com/qianggezhishen/p/7349474.html
Copyright © 2011-2022 走看看