PDA

View Full Version : Customizing Apache


dennylin93
December 23rd, 2008, 14:39
I'm installing Apache from ports, and I want to know if there's a way to modify this part of the HTTP header:
Server: Apache/2.2.8 (FreeBSD)

Is it possible to modify what shows up? Thanks in advance.

Voltar
December 23rd, 2008, 19:54
You can modify the ServerTokens (http://httpd.apache.org/docs/2.2/mod/core.html#servertokens) directive in httpd.conf, is that what you're looking for?

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

bsddaemon
December 24th, 2008, 01:32
Security through obscurity?

You can also modify the source code, recompile then install.

tristan
December 28th, 2008, 00:23
You could add the following to your httpd.conf:
ServerTokens Prod
which will result in Apache only reporting: Server: Apache

You could also change the AP_SERVER_BASEPRODUCT in the source (src/include/httpd.h), but I would not recommend it, since some modules do a check on this (mod_perl will not want to compile if you do this for example).