Server Administration > Linux Server Tips > Apache Error
Apache Not Starting
On a Linux server with Plesk control panel, Apache was not working. I tried to start apache, but it do not work.
# service httpd start
Starting httpd: [FAILED]
I checked the Apache error log file at /etc/httpd/logs/error_log and found following error.
[Thu Sep 21 09:58:49 2006] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "server2.leverettsoftware.com"
The error was caused by servers HOST NAME is not resolving.
The problem is fixed by editing DNS record of the domain and adding A Record
server2 A IP-OF-SERVER
In this case i can't edit DNS, so i done a quick fix, but this is not the correct way.
I edited /etc/hosts file and added following line.
[root@server2 logs]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain
184.108.40.206 server2.leverettsoftware.com server2
/etc/hosts override the DNS server for the server (only from inside). DNS resolving first look /etc/hosts when the computer need to resolve a domain.