使用Apache作为代理服务器+ Tomcat

问题描述:

我试图显示自定义页面,当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> 

但是没有成功。

在问你的问题之前,你甚至可以看看ProxyPass的httpd文档吗?

你想

ProxyPass /error ! 

排除路径开始/error

+0

的感谢!这正是我需要的! –