Monday, February 13, 2012

Remove http header data

Sometimes I found that it's useful to have set or unset some http headers. Thus in apache 2.x using mod_headers you can do the following magic (in my case inside of a vhost declaration):

1. check the module is loaded :
       httpd -M 
2. edit your config and add :
        Header always unset X-Generator
        Header always unset X-Powered-By

3. test using curl :
        curl -I example.com

 Documentation : http://httpd.apache.org/docs/2.0/mod/mod_headers.html

No comments:

Post a Comment