You may get the error when restarting apache.

# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: httpd: apr_sockaddr_info_get() failed for XXXXX
httpd: Could not reliably determine the server's fully qualified domain name, using for ServerName

It is because of the apache variable ServerName has not been set.

In CentOS, you can do the changes as below.

# vi /etc/httpd/conf/httpd.conf

Press “/” and type “ServerName” and then press Enter to find the string “ServerName”

You may find the following line


Add a line as below or change the line to the following


Press “ESC” and press “:” and type “wq” and then press Enter to save it

Restart the apache again!

# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]


Have you encountered any problem? Leave a message here!