Material is kept here for reference from the main article, Setup Apache Web Server on Ubuntu LInux.
Provide Server Name
As of June 5, 2012 the more recent build of Ubuntu 12 and Apache 2.2.22 add an entry into the file called name,
sudo echo "ServerName $(bash -c "hostname")" >> /etc/apache2/conf.d/name"
With even older versions of Apache and Ubuntu (I need to track down when this changed) I traditionally added the entry to httpd.conf,
sudo echo "ServerName $(bash -c "hostname")" >> /etc/apache2/httpd.conf"