Apache:如何向用户隐藏服务器版本和操作系统? [英] Apache: how to hide server version and operation system from users?

查看:104
本文介绍了Apache:如何向用户隐藏服务器版本和操作系统?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经读过一个站点,我需要在 httpd.conf 文件中添加两行:

I've read on one site that I need to add two lines to httpd.conf file:

关闭服务器签名

ServerTokens产品

ServerTokens Prod

但是,当我添加它们时,什么都没有改变.如前所述,我可以在浏览器中看到

But when I've added them nothing changed. As previously I can see in my browser

Apache/2.2.16(Debian)

Apache/2.2.16 (Debian)

这也许很重要:当我打开文件时(我的意思是在添加以上行之前), httpd.conf 我看到它是空的.我使用VPS.

Maybe that's important: When I opened file (I mean before adding above lines) httpd.conf I saw it's empty. I use VPS.

谢谢!

推荐答案

您没有提供有关操作系统/发行版等的足够信息

you didnt give enough information about os/distribution etc

但是在ubuntu的apache安装中,apache2.conf看起来像这样:

but in ubuntu's apache installation apache2.conf looks like this:

<cut>
Include httpd.conf
Include ports.conf
Include conf.d/
Include sites-enabled/

,在 conf.d/security 中,您可以看到

ServerTokens OS

只需检查您的配置,在您的httpd.conf中设置它后,它就会被覆盖

just check your configs, somewhere it gets overwritten after you set it in your httpd.conf

这篇关于Apache:如何向用户隐藏服务器版本和操作系统?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆