linux disable server version and operation system

sudo nano /etc/apache2/conf-enabled/security.conf
  • change ServerTokens OS to ServerTokens Prod
  • change ServerSignature On to ServerSignature Off

Restart Apache :

sudo service apache2 restart or sudo /etc/init.d/apache2 restart