Disable All Apache-Added Headers

丶灬走出姿态 提交于 2019-12-09 19:32:51

问题


i have apache 2.2 and php 5.3.8 installed on my pc running windows 7, and i was trying to send http responses using the php. but i realized that apache automatically adds some headers like Date: and Server: in the response. is there any way to prevent this? i don't want any header to be added by apache.

thanks in advance


回答1:


You can minimize the header output of Apache by setting the following two lines in you apache2.conf:

ServerTokens ProductOnly
ServerSignature Off

This will disable the servers signature. http://httpd.apache.org/docs/2.0/mod/core.html#serversignature

As for the Date header, this is required by the HTTP standard.



来源:https://stackoverflow.com/questions/8031315/disable-all-apache-added-headers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!