It is not good to expose your server information. Follow the steps given to disable Apache header information.
Edit your main Apache configuration file, and you can find the following directives.
vim /etc/httpd/conf/httpd.conf --- ServerSignature On ServerTokens OS ---
Please change it to as shown below.
ServerSignature off ServerTokens Prod
You can find some information about the ServerSignature and ServerTokens directives below.
ServerSignature: This directive allows the configuration of a trailing footer line under server-generated documents ( error messages, mod_proxy ftp directory listings, mod_info output, …etc.). The Off setting will suppress the footer line.
ServerTokens: This directive controls whether the Server response header field sent back to clients includes a description of the generic OS-type of the server as well as information about compiled-in modules.
ServerTokens Prod[uctOnly] Server sends (e.g.): Server: Apache ServerTokens Major Server sends (e.g.): Server: Apache/2 ServerTokens Minor Server sends (e.g.): Server: Apache/2.0 ServerTokens Min[imal] Server sends (e.g.): Server: Apache/2.0.41 ServerTokens OS Server sends (e.g.): Server: Apache/2.0.41 (Unix) ServerTokens Full (or not specified) Server sends (e.g.): Server: Apache/2.0.41 (Unix) PHP/4.2.2 MyMod/1.2
This setting applies to the entire server and cannot be enabled or disabled on a virtualhost-by-virtualhost basis.
Add the below entries to disable Apache Last Modified header.
<filesMatch ".*$"> Header unset Last-Modified
Restart Apache.
/etc/init.d/httpd restart
That’s it!! You have disabled Apache header information.