2013-10-07 48 views
0

我試圖顯示自定義頁面,當tomcat關閉時,爲了做到這一點我usign apache服務器。我試圖將所有請求重定向到tomcat(localhost:8080),除了以'/ error'開頭的請求之外,我該怎麼做?我在httpd.conf文件中試過類似這樣的東西:使用Apache作爲代理服務器+ Tomcat

ErrorDocument 503 /error/503.html 

<IfModule proxy_http_module> 

ProxyPass /error http://localhost/ retry=0 
ProxyPassReverse /error http://localhost/ 

ProxyPass/http://localhost:8080/ retry=0 
ProxyPassReverse/http://localhost:8080/ 

</IfModule> 

但是沒有成功。

回答

0

在問你的問題之前,你甚至可以看看ProxyPass的httpd文檔嗎?

你想

ProxyPass /error ! 

排除路徑開始/error

+0

的感謝!這正是我需要的! –

相關問題