CentOS httpd: Could not reliably determine the server's fully qualified domain name

(Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName에서 넘어옴)
  다른 뜻에 대해서는 우분투 apache2: Could not reliably determine the server's fully qualified domain name 문서를 참조하십시오.
httpd 시작시 경고 메시지
httpd: Could not reliably determine the server's fully qualified domain name

1 문제상황[ | ]

[root@zetawiki ~]# service httpd start
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 111.222.33.44 for ServerName
                                                           [  OK  ]
→ 방치해도 상관 없지만, 깔끔하지 않다...

2 httpd.conf 확인/수정[ | ]

[root@zetawiki ~]# cat /etc/httpd/conf/httpd.conf | grep ServerName
# ServerName gives the name and port that the server uses to identify itself.
#ServerName www.example.com:80
# ServerName directive.
#    ServerName dummy-host.example.com
→ ServerName이 지정되지 않았다.

실제 인터넷 도메인과 맞을 필요는 없다. 형식만 맞춰주면 된다.

[root@zetawiki ~]# sed -i 's/\#ServerName/ServerName/g' /etc/httpd/conf/httpd.conf
[root@zetawiki ~]# cat /etc/httpd/conf/httpd.conf | grep ServerName
# ServerName gives the name and port that the server uses to identify itself.
ServerName www.example.com:80
# ServerName directive.
#    ServerName dummy-host.example.com
→ 따라서, 주석처리(#) 제거하고 확인

3 httpd 재시작[ | ]

[root@zetawiki ~]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]
→ 더 이상 경고메시지가 뜨지 않는다.

4 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}