Could not determine the server’s fully qualified domain name

Thats message appear when I try to start apache using apachectl.

#apachectl start
[Thu Jun  5 16:31:33 2008] [alert] httpd: Could not determine the
server’s fully qualified domain name
, using 127.0.0.1 for ServerName
/usr/local/sbin/apachectl start: httpd could not be started

to solve this problem I need to know hostname and edit /etc/hosts to put that information (fully qualified name).

1. Find hostname

proxysudirman# uname -a

2. Edit /etc/hosts entry

proxysudirman# ee /etc/hosts

::1                     localhost localhost.my.domain
127.0.0.1               localhost localhost.my.domain

127.0.0.1               proxy proxysudirman.rasyid.net

172.88.1.2              proxy2 proxysudirman2.rasyid.net

3. Start apache service

proxysudirman# apachectl start
/usr/local/sbin/apachectl start: httpd started

Done 🙂

Tags: