无法删除响应标头中的服务器(Amazon AWS)
我无法从响应标头中删除“服务器”标头。我正在使用亚马逊 EC2。我已将其添加到 Apache 配置中:
ServerSignature Off
Header unset Server
RequestHeader unset Server
它不执行任何操作。我仍然可以在响应标头中看到服务器标头显示“Apache (Amazon)”。有什么线索吗?
I cannot remove the "Server" header from the response headers. I am using Amazon EC2. I have added this in Apache config:
ServerSignature Off
Header unset Server
RequestHeader unset Server
It does not do anything. I can still see the server header saying "Apache (Amazon)" in the response headers. Any clue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以删除标头中的“Server: Apache/2.2.22 (Unix) ...”行,如下所示:
下载 Apache httpd tarball 并以通常的方式解压它。
将 include/ap_release.h 从: 更改
为
然后使用常用的配置/制作/制作安装过程重新编译。
最后,在您的 httpd.conf 文件中,包含以下行:
Restart your server,Apache 标头行将简单地变为 "Server: -" 。
You can remove the "Server: Apache/2.2.22 (Unix) ..." line in the header as follows:
Download the Apache httpd tarball and unpack it in the usual way.
Change include/ap_release.h from:
to
Then recompile with your usual configure / make / make install procedure.
Finally, in your httpd.conf file, include the line:
Restart your server and the Apache header line will simply become "Server: -" .
Apache 开发团队似乎认为这是设计工作。
无论如何,他们提供了一个补丁https://issues.apache.org/bugzilla/show_bug。 cgi?id=40026
It seems that Apache dev team think this is work as design.
Anyway they provide a patch https://issues.apache.org/bugzilla/show_bug.cgi?id=40026