Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

The currrent value of apache server header is

Server: Apache/2.4.2 (Win32) PHP/5.4.5

I want to modify/add a value to it. How can I do this?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

The Server header is controlled by the ServerTokens directive; mod_headers cannot touch the Server header being sent with a response.

If one of the options there doesn't suit your needs, you can recompile to change the hard-coded value, mod_security can alter it, or a proxy in front of Apache (including another Apache running mod_proxy and mod_headers) can alter the response headers after they've been sent.

share|improve this answer
add comment

You can modify source according to this:

http://www.devshed.com/c/a/Apache/Server-Limits-for-Apache-Security/3/

File: ap_release.h

  #define SERVER_BASEVENDOR   "Apache Group"
  #define SERVER_BASEPRODUCT  "Apache" 
  #define SERVER_BASEREVISION "1.3.29" 
  #define SERVER_BASEVERSION SERVER_BASEPRODUCT "/" SERVER_BASEREVISION 
  #define SERVER_PRODUCT  SERVER_BASEPRODUCT
  #define SERVER_REVISION SERVER_BASEREVISION
  #define SERVER_VERSION  SERVER_PRODUCT "/" SERVER_REVISION

And build your own binary.

You can also try to turn off sensitive information like the Apache version using the ServerTokens and ServerSignature settings in your httpd.conf (If it's a point of this modification)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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