Hide Server Version in Apache & Nginx

Knowledge Base Entry: #62
^Top
<< Back
Mobile-Menu










Hide Server Version in Apache & Nginx
Category: Apache2/Security
Author: Bugfish
Created at: 2020-11-19 12:29:03
Modified at: 2025-09-20 00:52:34
Directs Hits: 686

NGINX

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

APACHE2

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
Caution: 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.
This Website is using Session Cookies for Site Functionality.