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