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

Installing Rkhunter (Rootkit Hunter) in RHEL, CentOS and Fedora

Rkhunter (Rootkit Hunter) is an open source Unix/Linux based scanner tool for Linux systems...

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 Password Protect a Directory

This tutorial will teach how to password protect a directory. Password protecting a directory...

Installing and configuring Spamassassin on CentOS

If you run your own mail server you'll want it to run spam filtering software to reduce the...

How to Secure WHM/cPanel

Login to WHM using root username/passwdhttp://serverip:2086 or http://serverip/whm WHM –...