Hide Server Version in Apache & Nginx

Article 62 in Linux

2020-11-19 12:29:03 from bugfish
Hide Server Version in Apache & Nginx
Linux / Security
Last Review on: 2021-10-26 17:36:04 | Hits: 227


1. Go to the nginx configuration file:

nano /etc/nginx/nginx.conf

2. Uncomment this line:

server_tokens off;

3. Restart nginx

service nginx restart


1. Go to your apache2 configuration File:

nano /etc/apache2/apache2.conf (for Debian/Ubuntu)
nano /etc/httpd/conf/httpd.conf (Centos)

2. Modify the line ServerTokens and ServerSignature as below:

ServerTokens Prod
ServerSignature Off 

3. Restart Apache2 Service

service apache2 restart
I do not guarantee the reliability of the information given here, the code described on this page is executed at your own risk and in the event of damage or other unforeseeable consequences I am in no way responsible or liable.
Currently 0 Upvotes!
captcha image
System - 2021-01-01 19:30:38
We appreciate comments on our site!

This Website is using Session Cookies for Site Functionality and AWStats.