OS/Ubuntu
Apache2 error(?) - domain name...ServerName
whatwant
2015. 9. 29. 22:08
집에서 혼자서 리눅스를 사용하다가 Apache2를 사용하다보면 아래와 같은 경고(?) 메시지를 보곤 한다.
$ sudo service apache2 restart
* Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[ OK ]
* Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[ OK ]
Apache2 구동에는 별 지장이 없지만, 괜히 저런 메시지를 보면 기분이 나쁘니... 없애보자.
$ sudo nano /etc/apache2/httpd.conf
ServerName localhost
[ /etc/apache2/httpd.conf ] 파일을 수정하여 ServerName을 적어주면 된다.
$ sudo service apache2 restart
그리고, apache2를 재시작하면 기존에 보이던 마음에 안드는 메시지가 사라졌을 것이다!!!
위와 같이 해도 여전히 에러메시지가 나올 때가 있다.
그럴 때엔 앞에서 만든 "/etc/apache2/httpd.conf" 파일 삭제하고,
"/etc/apache2/apache2.conf" 파일의 제일 뒤에 "ServerName localhost" 적어주고 나서
"sudo service apache2 restart" 해주면 된다.
http://hosts.tistory.com/448
반응형