질문&답변
클라우드/리눅스에 관한 질문과 답변을 주고 받는 곳입니다.
리눅스 분류

가상호스트를 설정했는데도 아파치 홈으로 가버리네요 ㅜㅜ

작성자 정보

  • 김진명 작성
  • 작성일

컨텐츠 정보

본문


 

네임서버 설정을 마치고 nslookup abc.com 으로 하면 정상적으로 나타납니다.

[root@zest root]# nslookup abc.com
Note:  nslookup is deprecated and may be removed from future releases.
Consider using the `dig' or `host' programs instead.  Run nslookup with
the `-sil[ent]' option to prevent this message from appearing.
Server:         164.124.101.2
Address:        164.124.101.2#53

Non-authoritative answer:
Name:   abc.com
Address: 12.34.56.78

으로 나타납니다.
그래서 다른 도메인을 하나 더 세팅했고 그도메인도 역시 정상적으로 나타납니다.

아파치에서 두 도메인 모두 가상호스트도 설정했고 apachectl configtest 를 하니 Syntax OK 로 나타납니다.

근데 문제는 두 도메인 모두 정상적으로 세팅했는데도 불구하고 각자의 홈디렉토리가 아닌

아파치 기본 홈디렉토리인 /usr/local/apache/htdoc 로 이동해버리더군요

가상 호스트 설정에는 아무 문제가 없는것 같구요.. 아래와 같습니다.

<VirtualHost 12.34.56.78>
    ServerAdmin webmaster@abc.com
    DocumentRoot /home/abc/public_html
    ServerName abc.com
    ServerAlias www.abc.com
</VirtualHost>

<VirtualHost 12.34.56.78>
    ServerAdmin webmaster@def.com
    DocumentRoot /home/def/public_html
    ServerName def.com
    ServerAlias www.def.com
</VirtualHost>

으로 설정했습니다.

근데 왜 저렇게 이동할까요?

그래서 httpd 를 실행해보니 다음과 같이 나오더군요.
도대체 머가문제일까요?

[root@zest root]# httpd --D

httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down

왜 이런게 뜰까요? 원래는 http -D 라던데 이건 안되고 httpd --D 로는 되네요


관련자료

댓글 1

이용섭님의 댓글

  • 이용섭
  • 작성일
NameVirtualHost 12.34.56.78
<== 위 한 줄을 <VirtualHost 12.34.56.78> 앞 줄에 일단 삽입하고 보세요.
httpd: Could not determine the server's ...에 대한 답은 아니지만 httpd.conf의 선언부에 위 한줄이 빠진 것은 이상합니다.

공지사항


뉴스광장


  • 현재 회원수 :  60,076 명
  • 현재 강좌수 :  36,001 개
  • 현재 접속자 :  417 명