Change Apache Server Signature with mod_security

Posted on July 24, 2013 at 9:11 am

The Apache module mod_security allows us to change the server signature to a custom name, such as MyServer or PrivateServer.

Install mod_security:

apt-get install libapache-mod-security

Enable the module:

a2enmod mod-security

Edit the file:

vi /etc/apache2/conf.d/security

Change these values:

ServerTokens Full
SecServerSignature My_Server_Name

Reload Apache:

/etc/init.d/apache2 reload

Check the HTTP response header:

HTTP/1.1 304 Not Modified
Date: Thu, 08 Mar 2012 13:22:40 GMT
Server: My_Server_Name
Connection: Keep-Alive
Keep-Alive: timeout=15, max=97
ETag: "5ee1278-9ae0-4a72c8daa7200"
Vary: Accept-Encoding

Note the string:

Server: My_Server_Name

Updated on October 22, 2013 at 4:09 pm

Receive updates via email

Other Posts

Updated Posts