httpd: apr_sockaddr_info_get() failed for “hostname”

When I start httpd service,I get a warning :

“Starting httpd: httpd: apr_sockaddr_info_get() failed for myservername, httpd: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName”

This error is caused by the improper configuration of hostname of server,to fix it follow the steps below:
There are three methods for fixing, choose one as you preferred.
1- Edit Hosts File and add myservername declaration in the end of /etc/hosts :

$ sudo nano -w /etc/hosts
27.0.0.1 localhost localhost.localdomain localhost4 localhost4.l$
::1 localhost localhost.localdomain localhost6 localhost6.localdoma$
127.0.0.1 myserver.myhome.com myserver

2- Only edit httpd.conf :

$ sudo nano -w /etc/apache2/httpd.conf
  ServerName myserver.myhome.com

3- Edit network :

$ sudo nano -w /etc/sysconfig/network HOSTNAME=myserver.myhome.com

4-  Verify :

$ hostname
(output) myserver.myhome.com
$ hostname -f
(output) myserver.myhome.com