0

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?

2

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.

1

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)

Your Answer

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