Open your httpd.conf (or apache2.conf in Ubuntu) file using text editor such as vi:
vi httpd.conf
Append/modify config directive as follows:
ServerSignature Off
ServerTokens Prod
Save and close the file. Restart Apache web server:
# /etc/init.d/httpd restart
or, in Ubuntu
# /etc/init.d/apache2 restart