2011-04-27 2 views
0

Tomcat6에서 실행되는 웹 응용 프로그램이 2 개 있습니다. 현재, 나는 http://staging.domain.com/app1를 통해 APP1에 액세스 할 수 있습니다, 지금은 ... 다음과 같은 설정으로 mod_proxy를 통해mod_proxy를 통해 Tomcat에서 실행중인 여러 응용 프로그램을 프록시 할 수있는 방법

<VirtualHost xxx.xxx.xxx.xxx:80> 
    ServerAdmin [email protected] 
    ServerName staging.domain.com 

    ProxyPass /app1 http://localhost:8080/app1 
    ProxyPassReverse /app1 http://localhost:8080/app1 
</VirtualHost> 

을 그들 중 하나에 액세스 할 수 있습니다. 같은 방법으로 app2에 액세스 할 수 있기를 원합니다. http://staging.domain.com/app2. 그러나 두 번째 VirtualHost를 구성했지만 첫 번째 VirtualHost 만 작동합니다. 단일 도메인에서 2 개의 웹 앱을 프록시 할 수도 있습니까? 그렇다면 모든 힌트, 팁, 트릭을 크게 높이 평가할 것입니다.

답변

2

아, 당신은 이미 그것을하고 있습니다 : 추가 ProxyPass/ProxyPassReverse 문을 추가하십시오.

<VirtualHost xxx.xxx.xxx.xxx:80> 
    ServerAdmin [email protected] 
    ServerName staging.domain.com 

    ProxyPass /app1 http://localhost:8080/app1 
    ProxyPassReverse /app1 http://localhost:8080/app1 

    ProxyPass /app2 http://localhost:8080/app2 
    ProxyPassReverse /app2 http://localhost:8080/app2 

    ProxyPass /app3 http://localhost:8080/app3 
    ProxyPassReverse /app3 http://localhost:8080/app3 
</VirtualHost> 
+0

너무 가까웠습니다. : O) 고마워. – Gregg

관련 문제