Changing the identification of Apache 2

To make it harder for an attacker to find out which web server you are running you can change the values in Apache 2's server HTTP header ie.:

Server: Apache/2.0.50 (Unix) 

To do this you will need to recompile it.

After you have downloaded and extracted the source, open up the following file:

include/ap_release.h

In this file you will see the release constants:

#define AP_SERVER_BASEPRODUCT "Apache"
#define AP_SERVER_MAJORVERSION "2"
#define AP_SERVER_MINORVERSION "0"
#define AP_SERVER_PATCHLEVEL "50"

Just change these to whatever you want.

Next change into the 'server' directory and do:

make clean
cd ..
make

Then to test your new server version run:

./httpd -V

to reinstall just run:

make install

Last updated: 25/06/2005