Nginx:
Nginx.conf in nginx configuration file, add the following code:
server_tokens off;
Apache:
In the apache configuration file httpd.conf, add the following code:
ServerTokens Prod
ServerSignature Off
PHP:
In the php configuration file php.ini, add the following code:
expose_php = Off
Modify restart the service.