Hide Apache Version From HTTP Header

How to hide apache version

Why All Good companies Hide there apache Server Version or Information.
Here is one of most reason why they
hide apache/httpd version. The reason behind is security, Many hackers use the

 

Apache version to hack any website. If hackers know Apache version little bit easy to hack any site.

 

Check httpd header with the following command,

# curl -I  http://yoursitename.com
Output:- 

HTTP/1.1 200 OK

Date: Fri, 31 May 2019 08:21:01 GMT

Server: Apache/2.4.6 (CentOS) PHP/7.2.14

Last-Modified: Tue, 24 Jul 2018 11:13:21 GMT

Accept-Ranges: bytes

Content-Length: 101

Content-Type: text/html; charset=UTF-8


How To Hide Apache Version From Http Header. Also Check How to Disable Apache Directory Listing
 

Open apache configuration file using your favorite editor such as vim.

 

# vim /etc/httpd/conf/httpd.conf

Modify the following variable as follows:-

ServerSignature Off

ServerTokens Prod

After making changes save and close the file, and restart Apache service with the following command.

# sudo service httpd restart 

Now check again httpd header.

# curl -I http://yoursitename.com
Output:-

HTTP/1.1 200 OK

Date: Fri, 31 May 2019 08:21:01 GMT

Server: Apache

Last-Modified: Tue, 24 Jul 2018 11:14:25 GMT

Accept-Ranges: bytes

Content-Length: 101

Content-Type: text/html; charset=UTF-8

That’s it! Thanks for Visit Hostingride

 

Also, Check How to Install and Configure Apache Server

Blog type: 

Add new comment

Authored By

Sandeep Gurjar

Hy all, This is Sandeep Gurjar am the founder of hostingride.in. I am a Redhat Certified Engineer (RHCE) / AWS Solutions Architect-Associate and working as an system administrator since 2016.

Follow us on

Facebook​  Twitter  LinkedIn  Google+