How to remove “server” information from http-header in Apache 2.4

In this post we will show you how to remove “server” information from header, in Apache 2.4, this header have information about our server and like improve we can hide it.

This tutorial it’s was made under an Ubuntu 14.04 server and Apache 2.4

Before start

You can check Apache header with the next command:

(you have to change the IP 192.168.1.104 for your server IP 😉 )

The result was the next:

In the line 3 you can see Server information (Apache/2.4.7).

Now we continue with the tutorial:

1) For hide server information from header, we need to have installed the modsecurity, if you don’t have installed the modsecurity you can check this post: How to install mod_security in Apache 2.4

2) After then, you need to do some a little change in this file:

We will add the next line:
(line 11)

After then, save the file and we have to restart Apache server:

You can watch the next video for review the result: