This is just a friendly warning and not really a problem (as in that something does not work).
If you go to:
/etc/apache2/apache2.conf
and insert:
ServerName localhost
and then restart apache by typing into the terminal:
sudo systemctl reload apache2
the notice will disappear.
If you have a name inside /etc/hostname
you can also use that name instead of localhost