I run a CentOS box with WHM/cPanel, and I rebuilt Apache to have mod_headers.

mod_headers works fine when I am adding new headers, but for some reason I cannot change the "Server:" header to a different value.

I have tried

Header unset Server
Header set Server "Test"

but it still does not change it in the request. Meanwhile, other header directives such as

Header add foo bar

shows up in the HTTP response.

How can I use mod_headers to change the value of the HTTP "Server:" response? Thanks in advance.

2 Answers 2


Apache version? In 1.3 and earlier mod_headers can't alter Server header, but you may alter defines in sources and recompile it.

  • I am running Apache/2.2.1
    – David
    Oct 4, 2011 at 9:51
  • In what context are you using Header directive? Try to leave only unset directive, will the Server: header disappear? If not, this is bug,report it to CentOS maintainers Oct 4, 2011 at 14:58

Actually the Server: header is controlled by the ServerTokens directive in apache and you can set it to Prod to send minimal info out.

ref: http://httpd.apache.org/docs/2.2/mod/core.html#servertokens

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.