본문 바로가기
구 블로그 보관처

[ERROR] httpd: apr_sockaddr_info_get() failed for localhost.localdomain

by 행복한 만수킴 2020. 5. 17.

 

삑. 에러 발생. 고쳐보자. 

 

 

* 상황 : httpd 시작 시 아래와 같은 에러 발생.

[root@centos ~]# httpd -k restart

httpd: apr_sockaddr_info_get() failed for localhost.localdomain

httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

 

[root@centos ~]# httpd -k stop

httpd: apr_sockaddr_info_get() failed for localhost.localdomain    ===> ERROR 1

httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName ===> ERROR 2

 

[root@centos ~]# tail -f /var/log/httpd/error_log

[Fri Apr 11 16:38:15 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)

[Fri Apr 11 16:38:15 2014] [notice] Digest: generating secret for digest authentication ...

[Fri Apr 11 16:38:15 2014] [notice] Digest: done

[Fri Apr 11 16:38:15 2014] [notice] Apache/2.2.15 (Unix)/ DAV/2 configured -- resuming normal operations

 

 

* 서버에 세팅한 호스트명을 /etc/hosts에 입력해주어야 한다. (http://blog.wincomi.com/235) 

==> "ERROR 1"만 해결 됨. 

[root@centos ~]# vi /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4 localhost.localdomain

 

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6 localhost.localdomain

 

 

* /etc/sysconfig/network에 있는 HostName을 /etc/hosts에도 맞추어줘라? (http://blog.naver.com/PostView.nhn?blogId=jjusik2&logNo=127255424)  

==> 모두 다 해결됨.

[root@centos ~]# vi /etc/hosts


127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4 

192.168.0.123 localhost.localdomain

 

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6 

 

 

* 수정 후 결과

[root@centos ~]# httpd -k start

 

[root@centos ~]# 

 

[root@centos ~]# tail -f /var/log/httpd/error_log

[Fri Apr 11 17:15:29 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)

[Fri Apr 11 17:15:29 2014] [notice] Digest: generating secret for digest authentication ...

[Fri Apr 11 17:15:29 2014] [notice] Digest: done

[Fri Apr 11 17:15:29 2014] [notice] Apache/2.2.15 (Unix) DAV/2 configured -- resuming normal operations

 

 

 

 

 

 

 

 

댓글0