Last days i was confronted with issue above. i tried many solutions but it doesn’t really work , let me show you in this small tutorials how i have fixed it.
My running system is OpenSUSE but the solution should work for other Linux systems.
Now Please think that is related to your IP or hostname
the Solution is to find apache.conf or httpd.conf find the line with ServerName if the line Doesnt exit you may add it Manually
ServerName localhost # or put your real hostname instead )
save and exit
in my case
vi /etc/apache2/httpd.conf
Save and exit .
Restart apache
systemctl restart apache2
in case of Centos or other related Systems to
systemctld restart httpd
Check the Status Now
systemctl status httpd
systemctl status apache2
No erros displayed Now .