How to remove server tokens
PLESK
mkdir -p /usr/local/psa/admin/conf/templates/custom/domain
cp /usr/local/psa/admin/conf/templates/default/server.php /usr/local/psa/admin/conf/templates/custom
cp /usr/local/psa/admin/conf/templates/default/domain/nginxDomainVirtualHost.php /usr/local/psa/admin/conf/templates/custom/domain
cp /usr/local/psa/admin/conf/templates/default/domain/nginxForwarding.php /usr/local/psa/admin/conf/templates/custom/domain
Modify server.php
:
remove Header add X-Powered-By PleskLin
Modify nginxDomainVirtualHost.php
:
remove add_header X-Powered-By PleskLin;
Rebuild configuration files:
/usr/local/psa/admin/sbin/httpdmng --reconfigure-all
https://support.plesk.com/hc/en-us/articles/115000385274-How-to-remove-modify-the-X-Powered-By-header-
NON PLESK
On Debian, Ubuntu or Linux Mint:
$ sudo vi /etc/apache2/apache2.conf
On CentOS, Fedora, RHEL or Arch Linux:
$ sudo vi /etc/httpd/conf/httpd.conf
ServerSignature Off
ServerTokens Prod
The first line ‘ServerSignature Off’ makes Apache2 web server hide Apache version info on any error pages.
On Debian, Ubuntu, or Linux Mint:
$ sudo vi /etc/php5/apache2/php.ini
On CentOS, Fedora, RHEL or Arch Linux:
$ sudo vi /etc/php.ini
expose_php = Off
Finally, restart Apache2 web server to reload updated PHP config file. Now you will no longer see “X-Powered-By” field in HTTP response headers.