728x90

php.ini 파일을 수정하고 나서 service httpd restart 를 하니까 httpd 데몬이 살아나지 않는다.


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


라는 에러 메시지가 나온다.


vi /usr/local/apache/conf/httpd.conf
ServerName localhost

yum 설치가 아닌 소스 설치라서 httpd 경로명이 다르다.

vi 에서 /ServerName 입력하면 해당 라인으로 바로 이동된다.


httpd.conf 에 분명히 ServerName localhost 라고 적어주고 재시작을 했음에도 에러 메시지가 출력된다.


hosts 파일을 한번도 수정해 준 적어 없어서 생기는 에러였다.


# vi /etc/hosts
127.0.0.1   localhost.localdomain localhost
로 수정하고 저장한 다음 재시작을 눌러주니 정상적으로 OK가 출력된다. 또는

127.0.0.1   localhost

로 수정해도 된다.



만약 httpd 데몬이 죽지 않는다는 메시지가 나온다면

# killall -9 httpd

# netstat -anp | grep 80

로 확인해보라.

필요시

# kill -9 pid번호

를 하면 해당 데몬이 죽을 것이다.


블로그 이미지

Link2Me

,