How to Disable Apache Header Information : Easy Steps

Disable Apache Header information
It is not good to expose your server information. This article will help you to know how to disable Apache header information.

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.

Share this post

Services to Explore

Stay up to date!

Stay up to date with the Web Hosting, Cloud and Server Management Industry News and Tutorials!

We will send you only the relevant emails, and we respect your privacy. Please review our privacy policy for more info.

Linux Management Services

Focus on your business, and let us take care of your Linux Servers!
From what you are reading, it seems you are interested in Linux and related technologies. If you have a moment to spare, please take a look at our Linux Management Services plan, which might interest you even more!
Linux Management Plan

Value-Added Services

We have services that can help you run a successful business. With us, you don't have to worry about these areas because our experts will take care of it for you.

Introducing - WPHealers!

Complete WordPress Management, 24x7 Support & White Label Agency Plans!

WordPress migration service, security, white-label reseller services and lot more! Grab the introductory deals now!

WPHealers

ServerHealers uses cookies.