How to disable all Apache header information?

Follow the below steps to disable Apache header information.

Edit your mail Apache configuration file and add you can see the below lines somewhere in that file.

vim /etc/httpd/conf/httpd.conf

---
ServerSignature On

ServerTokens OS
---

Change it to as shown below.

ServerSignature off

ServerTokens Prod

Also add the below entries somewhere in it to disable Apache Last Modified header.

<filesMatch ".*$">

Header unset Last-Modified

</filesMatch>

Restart Apache.

/etc/init.d/httpd restart

Was this answer helpful?

 Print this Article

Also Read

Is my server hacked? Lets check it with rootkit hunter

RookHit Hunter is a command-line utility that will search your machine for...

Preventing DDOS aplification open resolver attack

DDOS Attack  by open DNS resolver: Open dns resolver provides name resolution to any network...

Disable shell access for unknown users

Suspect there are other users in your system that have shell access to your system? Please follow...

WHM/cPanel Server Hardening And Security Basics

1. Introduction A step by step paper how to secure linux server with cPanel/WHM andApache...

How to install mod_security on Apache 2.x

What is mod_security or modsecurity? ModSecurity is an open source intrusion detection and...