0

Just asked on StackOverflow, but more appropriate here.

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 requests to Tomcat except those going to /webmail/?

Thanks for the help.

3 Answers 3

1

Use

ProxyPass /webmail !
ProxyPass / ajp://localhost:8009/
0

Absolutely. I do this for web apps where I don't want people snooping in WEB-INF.

  ProxyPass / ajp://localhost:8009 /

  <Proxy />
    Order Deny,Allow
    Allow from All
  </Proxy>

  <Proxy /webmail>
    Order Deny,Allow
    Deny from All
  </Proxy>
1
  • Thanks, but I was actually hoping to still let request to webmail go through. They just wouldn't go to Tomcat. Someone on StackOverflow suggested this: RewriteEngine On RewriteCond REQUEST_URI !^/webmail* RewriteRule / /tomcat/ <Location /tomcat> ProxyPass ajp://localhost:8099/ </Location> but the rewrite rule doesn't seem to be kicking in.
    – Joe
    Aug 31, 2010 at 3:14
0

A second proxy pass for /webmail ahead of the proxy pass for / may work. I believe they are matched in order.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .