리눅스

httpd 서버의 정규화된 도메인 이름을 인식하지 못해서 발생하는 경고 메시지

변군이글루 2013. 6. 25. 09:12
반응형

httpd(Apache) 서버의 정규화된 도메인 이름을 인식하지 못해서 발생하는 경고 메시지

경고 메시지

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

해결 방법

Apache 설정 파일에 ServerName을 명시적으로 지정하면 해결됩니다.

CentOS

ServerName 설정 추가

echo "ServerName $(hostname -f)" >> /etc/httpd/conf/httpd.conf

(또는) 직접 설정

vim /etc/httpd/conf/httpd.conf
...
(원본) #ServerName www.example.com:80
(수정) ServerName 127.0.0.1:80
...

Apache 재시작

systemctl restart httpd

Ubuntu

echo "ServerName $(hostname -f)" | sudo tee /etc/apache2/conf-available/servername.conf
sudo a2enconf servername
sudo systemctl restart apache2

 

728x90
반응형