How to remove date header from apache?

2019-06-17 01:42发布

问题:

I need to minimize Apache HTTP response headers, by now i reduced them as following

HTTP/1.1 200 OK
Date: Thu, 25 Mar 2010 21:57:41 GMT
Server: Apache
Content-Type: text/html

I'd like to know if there is a way to disable Date and Server header, only for a certain virtual host.

Thank you!

回答1:

The Date header is required at part of the HTTP standard. You can't remove it without being non-compliant with the http standard, so apache doesn't generally allow that.