5
我試圖創建一個虛擬主機dev.company.com,它根據域後的路由到達不同的應用程序。具體而言,我想:在命名虛擬主機中使用多個ServerPath指令
- /詹金斯 - 路由到詹金斯服務器
- /應用 - 路由到一個登陸頁面鏈接到各種應用
- /三葉草 - 路由到特定詹金斯建設報告 - http://dev.company.com/jenkins/job/proj-master-clover/clover/
- /- 一切應路線到Tomcat服務器
我使用以下配置:
<VirtualHost *:80>
ServerName dev.company.com
ServerPath /jenkins
ProxyPass /jenkins http://easyrider:8080/jenkins
ProxyPassReverse /jenkins http://easyrider:8080/jenkins
ServerPath /clover
Redirect /clover http://dev.company.com/jenkins/job/proj-master-clover/clover/
ServerPath /apps
DocumentRoot "/usr/local/sites/developers"
<Directory "/usr/local/sites/developers">
DirectoryIndex index.html
Options Indexes MultiViews
</Directory>
ServerPath/
ProxyPass/http://tomcat_server:8080/
ProxyPassReverse/http://tomcat_server:8080/
</VirtualHost>
http://dev.company.com/jenkins工作正常,但/ apps和/ clover總是重定向到Tomcat服務器。正確的方法來做到這一點?