In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "apache startup error httpd: apr how to solve". In the actual case operation process, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
Restart Apache:
service httpd restart
Although the restart was successful, the following prompt message was given:
httpd: apr_sockaddr_info_get() failed for hoteel
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
The reason is because when configuring DNS hostname hoteel caused, re-hostname localhost can be.
1. Appears when httpd is started
Starting httpd: httpd: apr_sockaddr_info_get() failed for MYHOST
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName.
This problem should be that ServerName is not set in/etc/httpd/conf/httpd.conf, so it will be replaced with the name on the host. First, it will look for the host definition in/etc/hosts.
So to solve this problem, you can set ServerName or fill in your own host name MYHOST in/etc/hosts, like this:
vi /etc/hosts
127.0.0.1 localhost.localdomain localhost MYHOST
2. After installing Apache 2.2.6 under Linux, start HTTP service and report error
[root@linux http]# ./ apachectl start
httpd: apr_sockaddr_info_get() failed for linux(apr_sockaddr_info_get() failed for freebsdla on BSD)
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
After analysis, it is found that the hostname setting in the configuration file httpd.conf under the apache conf directory is not consistent with the HOSTNAME setting in/etc/sysconfig/network. This problem can be solved by modifying it to a unified hostname.
Note: The default hostname for/etc/sysconfig/network is: HOSTNAME=localhost.localdomain
PS: There is such a method on the Internet, it seems useless, because I think apache will compile ARP during the compilation and installation process, so the following operation is a bit redundant.
Apr and apr-util are included in the Apache httpd distribution source code and are used without problems in most cases. Of course, if version 1.0 or 1.1 of apr or apr-util is already installed on your system, you must upgrade your apr/apr-util to version 1.2, or compile httpd separately. To install using the apr/apr-util source code included with the distribution, you must manually complete:
The copy code is as follows:
Compile and install apr 1.2
apr
./ configure --prefix=/x/httpd/apr
make
make install
apr-util
./ configure --prefix=/x/httpd/apr_util --with-apr=/x/httpd/apr
make
make install
apache
./ configure --prefix=/x/httpd/apache2
-enable-so
-enable-cgi
-enable-rewrite
-enable-mods-shared=all
-with-apr=/x/httpd/apr
-with-apr-util=/x/httpd/apr_util
LDFLAGS="-L/usr/lib64 -L/lib64"
The correct setting of this machine must be the same
[root@spring ~]# nl /etc/hosts
1 # Do not remove the following line, or various programs
2 # that require network functionality will fail.
3 127.0.0.1 localhost.localdomain spring http://www.iis7.com/a/lm/ftp/
[root@spring ~]# nl /etc/sysconfig/network
1 NETWORKING=yes
2 NETWORKING_IPV6=no
3 HOSTNAME=spring
4 #GATEWAY=192.168.8.1
[root@spring ~]# less /etc/httpd/conf/httpd.conf|grep ServerName
"apache startup error httpd: apr how to solve" content is introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.