This can be used to for several reasons:
- To add headers to modify the behavior of a specific ‘misbehaving’ browser or client.
- To replace headers that you don’t want leaked to the Internet.
- To add monitoring information to your server responses.
Changes can be accomplished in the Apache2 ‘httpd.conf’ file.
- Verify that the module is not disabled or commented out:
LoadModule headers_module modules/mod_headers.so
- To add some common metrics:
<IfModule headers_module>
Header append MyHeader “%D %t”
</IfModule> - To Hide the HTTP Server header that you send in your responses (often done for security through obscurity):
<IfModule headers_module>
Header unset Server
</IfModule> - You could also replace the Server Header like this:
<IfModule headers_module>
Header set Server “ScottServer 1.0”
</IfModule>
Cheers!
REFERENCES: