有的时候,我们为了从安全角度考虑,防止黑客恶意攻击。我们会隐藏掉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

禁掉Apache web server签名 How to turn off server signature on Apache web server的更多相关文章

  1. apache 提示You don't have permission to access /test.php on this server.怎样解决

    原文:apache 提示You don't have permission to access /test.php on this server.怎样解决 关键字: Apache   403  For ...

  2. linux后台server开发环境的部署配置和验证(nginx+apache+php-fpm+FASTCGI(C/C++))

    linux后台server开发环境部署配置 引言 背景 随着互联网业务的不断增多.开发环境变得越来越复杂,为了便于统一server端的开发部署环境,特制定本配置文档. 使用软件 CentOS 6.3( ...

  3. 在新安装的Linux系统中,防火墙默认是被禁掉的,一般也没有配置过任何防火墙的策略,所有不存在/etc/sysconfig/iptables文件。

    原因:在新安装的Linux系统中,防火墙默认是被禁掉的,一般也没有配置过任何防火墙的策略,所有不存在/etc/sysconfig/iptables文件. 解决办法: .随便写一条iptables命令配 ...

  4. The server does not support version 3.0 of the J2EE Web module specification

    1.错误: 在eclipse中使用run->run on server的时候,选择tomcat6会报错误:The server does not support version 3.0 of t ...

  5. unity, 在OnDisable里一定要将Cloth禁掉

    如果在OnDisable中不将Cloth组件禁掉,则当物体再次激活时布料将变形.

  6. The server does not support version 3.1 of the JEE Web module specification.

    使用MyEclipse2015打开MyEclipse2014编辑的项目,在服务器Tomcat 7部署时,提示"The server does not support version 3.1 ...

  7. Solution(项目部署):The server does not support version 3.0 of the J2EE Web module specification

    1.错误: 在eclipse中使用run->run on server的时候,选择tomcat6会报错误:The server does not support version 3.0 of t ...

  8. Qt中如何禁掉所有UI操作以及注意事项(处理各个widget的eventFilter这一层,但是感觉不好,为什么不使用QApplication呢)

    刚做完的一个项目,在测试时出现了一个问题:由于多线程的存在,当进行语音识别时:如果用户点击程序界面上的button或者其他接受点击事件后会发出信号的widget时,程序会crash ! 后来尝试着从多 ...

  9. 用 Identity Server 4 (JWKS 端点和 RS256 算法) 来保护 Python web api

    目前正在使用asp.net core 2.0 (主要是web api)做一个项目, 其中一部分功能需要使用js客户端调用python的pandas, 所以需要建立一个python 的 rest api ...

随机推荐

  1. angularjs1-2,作用域、代码压缩

    <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content ...

  2. android WebViewClient和WebChromeClient

    一.Android之WebViewClient与WebChromeClient的区别 ANDROID应用开发的时候可能会用到WEBVIEW这个组件,使用过程中可能会接触到WEBVIEWCLIENT与W ...

  3. Huatuo's Medicine

    Huatuo's Medicine Time Limit: 3000/1000MS (Java/Others)     Memory Limit: 65535/65535KB (Java/Others ...

  4. Java-杂项: Java中Array和ArrayList区别

    ylbtech-Java-杂项: Java中Array和ArrayList区别 1.返回顶部 1. 1)精辟阐述:可以将 ArrayList想象成一种“会自动扩增容量的Array”. 2)Array( ...

  5. php如何判断两个时间戳是一天

    $date1 = getdate(strtotime('2013-12-31')); $date11 = getdate(strtotime('2014-01-01')); $date2 = getd ...

  6. oracle数据泵备份与还原

    完整的常用的一套oracle备份以及还原方案 --在新库中新建数据目录,我没有特别说明在哪执行的语句都可在plsql中执行 CREATE OR REPLACE DIRECTORY dump_dir A ...

  7. NSPort与NSRunloop的关系是流与消息调度的关系

    NSPort与NSRunloop的关系是流与消息调度的关系. NSPort 将流插入到消息调度队列: 相当于 Socket将流插入到应用一样 - (void)launchThread { NSPort ...

  8. Unity 动画系统(Mecanim) 术语及翻译 表格

    原文 翻译 Animation Clip 视频片段 Avatar 阿凡达 Retargeting 重定向 Rigging 绑定 skinning 蒙皮 Animator Component 动画组件 ...

  9. CF992E Nastya and King-Shamans_线段树

    Code: #include<cstdio> #include<algorithm> using namespace std; const int maxn = 200000 ...

  10. hdu 5691 Sitting in line 状压动归

    在本题中,n<=16n<=16n<=16, 不难想到可以将所选数字的编号进行状态压缩. 定义状态 dp[S][j]dp[S][j]dp[S][j],其中 SSS 代表当前所选出的所有 ...