Apache httpd starting issue regarding ServerName directive

After fresh installation of apache httpd 2.4, while starting the service I got this error:

# /etc/init.d/httpd restart
 * Starting web server httpd

 ... waiting httpd: apr_sockaddr_info_get() failed for server
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName


Even though my hostname in RHEL 6 is setup properly in /etc/sysconfig/network file:

# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=hs2.example.com 

To solve this issue, ServerName directive in the main httpd.conf need to be commented out and set as localhost: 
# vim /etc/httpd/conf/httpd.confServerName 

...
ServerName localhost
...


And now apache httpd restarting properly:

# /etc/init.d/httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]





Comments

Popular posts from this blog

Linux and AIX user non expiry and force password change at first login

Rebuild your new Yum repository after changing the packages

Running Docker Wildfly/JBoss Application Server in Debug mode via Eclipse