Try This
Using Kali-linux
Select Accessories > files
Goto
File System/etc/apache2
Make a copy of your apache2.conf file in case you do not like the result
ctrl-c then ctrl-v over the file name is a quick method
Open your apache2.conf file with leafpad
Add the following line to the config file
ServerName localhost
Save the file
Open a terminal window
type
service apache2 restart
The warning will be gone.
MTD