>> Delete Reply from No. 28156 article
No. RE: 버추얼 호스트에서... directoryIndex

등록 2001-04-23 20:05:00 By localhost     조회 2
이름 qKing    

		: 버추얼 호스트에서..(IP 베이스입니다..)
:
: <virtualhost 111.111.111.1>
: SeverName www.haha.co.kr(메인입니다)
: DocumentRoot /data/www/docs/haha
: ....
: directoryIndex (지정하지 않았습니다.)
: </virtualhost>
: <virtualhost 111.111.111.2>
: ServerName linux.haha.co.kr
: DocumentRoot /data/www/docs/haha/welcome
: ...
: linux.haha.co.kr
: directoryIndex haha.html
: </virtualhost>
:
: httpd.conf
:
: DirectoryIndex 부분에
: DirectoryIndex index.html. 이런식으로 되어있구요..
:
: linux.haha.co.kr 로 접속하면 www.haha.co.kr로 연결됩니다.
: 아마도 버추얼 호스트에서 지정한 haha.html을 못 찾는것 같네요.
:
: DirectoryIndex 와 DocumentRoot 부분을 어떻게 처리 해야 될런지
: 알고 싶네요..( 버출얼 호스트 부분 말구요..) 지금은 메인사이트 첫
: 페이지와 디렉토리가 쓰여있습니다.
 DirectoryIndex 는 /dir/ 이 호출되었을 때에 실제로는 /dir/index.html 과
같이 지정된 이름의 파일을 보여주는 것을 의미합니다.
이 기능은 버추얼호스트와는 별 관계가 없으므로 VirtualHost 섹션에서는
별도로 지정하지 않아도 됩니다.
 DocumentRoot 는 해당 호스트이름을 요청했을 때 보여줄 문서의 경로이므로
virtual Host의 경우에는 달리 하는 것이 정상이겠지요.
 그 외에 Virtual Host 가 정상적으로 작동하기 위해서 필요한 지시자가
몇개 있습니다.
 BindAddress * 부분과 (또는 Listen * 부분)
 NameVirtualHost 123.123.123.122 부분이 그것입니다.
 (위 두곳 모두 주석(#) 을 제거해 주세요)
 특히 ip-based 인 경우에는
 NameVirtualHost 123.123.123.111
 <VirtualHost 123.123.123.111>
  ServerName www.haha.co.kr   DocumentRoot /path/haha
  ....
</VirtualHost>
 NameVirtualHost 123.123.123.112
 <VirtualHost 123.123.123.112>
  ServerName linux.haha.co.kr
  DocumentRoot /path/linux
  ....
</VirtualHost>
 처럼 구성해줘야 합니다.
 (이런 경우에도 ip 별로 Name-based VirtualHosting 이 가능하며,
DNS 구성은 사전에 완료되어 있다는 전제로 설명드립니다)
 --
qKing
[관리자] 패스워드를 입력 하십시오. 답장이 존재하면 함께 삭제됩니다.[ 목록 | 이전 ]
패스워드:    

Copyleft 1999-2026 by JSBoard Open Project
Theme Designed by IDOO All right reserved