Vamos al directorio /etc/apache2 y editamos el fichero ports.conf
Y ponemos la siguiente directiva
ServerName localhost
Reiniciamos el servicio de Apache2 y ya no dará el error cuando ejecutemos un comando de apache2

Y esto es todo, feliz instaling!!
Saludos
Alex.