Solve httpd: apr_sockaddr_info_get () failed for Error
When installing the Apache httpd web server today:
(1)./configure
(2) make
(3) make install (root permission required)
By default, when you run apachectl start under/usr/sbin/, the following error is displayed:
Httpd: apr_sockaddr_info_get () failed for shiwei
Httpd: cocould not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
So I checked on the Internet and finally solved the problem based on previous experiences. To sum up, it is convenient for future use.
Cause: ServerName is not set in/etc/httpd/conf/httpd. conf. Therefore, apache will replace it with the host name. First, it will find the host definition in/etc/hosts.
Solution:
(1) You can set ServerName In the httpd. conf file as follows: ServerName localhost: 80
(2) enter your host name bogon in/etc/hosts, as follows: 127.0.0.1 shiwei (user name)
Reference URL:
Http://suo.iteye.com/blog/1096296
Http://blog.chinaunix.net/uid-21516619-id-1824989.html
Http://blog.csdn.net/lyjtynet/article/details/4213173