>> Edit article
이름
제목
패스워드
아까 축구할 시간에 질문을 올려서 답변이 없는것 같네요 ..^^; 그래서 다시 한번 질문을 올립니다. 너무나도 닭질을 해봤는데도 안되기에 이렇게 도움을 청합니다. apache 1.3.24 와 tomcat 3.2.1 을 이용한 가상호스트 서비스에서요. 가상 호스트를 서비스하기 전에는 ... xxx.xxx.xxx.xxx/yahoo 라고 웹브라우저에서 치면, index.jsp 파일을 인식했는데요. 가상호스트를 한후에, 예를 들어 www.yahoo.co.kr 을 치면 /home/yahoo/public_html/index.jsp 파일을 인식하는데 대신에 위의 xxx.xxx.xxx.xxx/yahoo 라고 치면 인식을 못합니다. jsp 파일뿐만 아니라 아예 그 디렉토리를 읽지 못하는 것 같습니다.-_-; 아무래도 xxx.xxx.xxx.xxx/yahoo 방식은 tomcat의 server.xml에서 가상디렉 토리 개념으로 잡아가는 것 같은데요. 제가 궁금한 것은 가상호스트로 yahoo.co.kr을 서비스할때 apache에서는 그냥 xxx.xxx.xxx.xxx/~yahoo 이렇게 하면 인식을 하잖아요. 그것처럼 tomcat에서두 xxx.xxx.xxx.xxx/yahoo 이렇게 하면 인식할 수 있게 하는 방법은 없나요. 가상호스트를 적용한 이후부터 ip어드레스로 찾는 url 은 인식이 안되서요. 참고로 tomcat 안의 server.xml 파일과 tomcat.conf 파일을 올려놓을께요. 많은 답변 부탁드립니다. [server.xml] <Context path="/yahoo" docBase="/home/yahoo/public_html" crossContext="true" debug="0" reloadable="true" > </Context> <Context path="/empas" docBase="/home/empas/public_html" debug="0" reloadable="true"> </Context> <!-- Virtual host example - In "127.0.0.1" virtual host we'll reverse "/" and "/examples" (XXX need a better example ) (use "http://127.0.0.1/examples" ) <Host name="127.0.0.1" > <Context path="" docBase="webapps/examples" /> <Context path="/examples" docBase="webapps/ROOT" /> </Host> --> <!-- 이부분이 가상호스트 설정부분임 --> <Host name="yahoo.co.kr"> <Context path="" docBase="/home/yahoo/public_html" reloadable="true"/> </Host> <Host name="empas.co.kr"> <Context path="" docBase="/home/empas/public_html" reloadable="true"/> </Host> </ContextManager> </Server> [tomcat.conf] ##################### Virtual Hosts ################################## NameVirtualHost xxx.xxx.xxx.xxx <VirtualHost xxx.xxx.xxx.xxx> ServerAdmin root@yahoo.co.kr DocumentRoot /home/yahoo/public_html ServerName yahoo.co.kr ServerAlias www.yahoo.co.kr <Directory /home/yahoo/public_html/WEB-INF> Order allow,deny deny from all </Directory> </VirtualHost> <VirtualHost xxx.xxx.xxx.xxx> ServerAdmin freebit@empas.com DocumentRoot /home/empas/public_html ServerName empas.com <Directory /home/empas/public_html/WEB-INF> Order allow,deny deny from all </Directory> </VirtualHost> 위에 처럼 가상호스트를 잡아줄때 tomcat.conf에서 두개 만들어 주면, server.xml에서도 두개를 만들어 주는 식으로 했습니다. 그리고 server.xml 의 context 부분은 가상디렉토리를 만들어주는 곳 같은데 가상호스트를 적용하기 전에는 context 부분에서 정의해준것처럼 가상디렉토 리를 인식했는데요. 가상호스트를 적용한 후부터는 context에서 정의한 부분 이 인식이 안되네요. 그럼 ...--강석만
Copyleft
1999-2026 by
JSBoard Open Project
Theme Designed by
IDOO
All right reserved