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

查看:30
本文介绍了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天全站免登陆