开发者

Apache forward everything to Tomcat except webmail

I have my Apache HTTP server set up to forward all requests to Tomcat, i.e. proxy_ajp.conf looks like:

ProxyPass / ajp://localhost:8009/

where Tomcat is listening on port 8009. This works find except when I try to access squirrelmail (i.e. webmail) on the server. Is there a way to forward all reque开发者_如何学编程sts to Tomcat except those going to /webmail/?

Thanks for the help.


This is really more of a serverfault sort of a question, but yes, you can do it.

You need to use a RewriteRule, something like this:

RewriteEngine On
RewriteCond REQUEST_URI !^/webmail.*
RewriteRule / /tomcat/

<Location /tomcat>
     ProxyPass ajp://localhost:8099/
</Location>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜