Re: how to use ProxyPassReverse* with more complex a ProxyPassMatch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 09 Dec 2012 00:45:05 +0100
Christoph Anton Mitterer <calestyo@xxxxxxxxxxxx> wrote:

> Hi.
> 
> I'm using a reverse proxy set up with ProxyPassMatch as the space I map
> to is rather complex and can't be mapped with a normal ProxyPass.
> 
> 
> Now the problem is obviously that:
> ProxyPassReverse
> ProxyPassReverseCookieDomain
> ProxyPassReverseCookiePath
> are only made for the simply ProxyPass form and there are no
> ProxyPassReverseMatch* versions.
> 
> Is this planned and is there some way to work around this in the
> meantime?
> 
> 
> Thanks,
> Chris.

Ok, so the mod_rewrite is your friend.  This is a working example that does a
reverse proxy to a tomcat server.  Its not the best, but it is functional and
I post it as an example of how to use rewrite to accomplish what you cannot do
with the simple proxypass stuff:

  <Location "/helpdesk">
     <LimitExcept POST GET PUT>
          Require all denied
     </LimitExcept>
     DirectoryIndex logon.jsp
     RewriteEngine On
     RewriteRule \.(pl|php|cgi) - [QSA,PT,L]
     RewriteRule \.(jpg|jpeg|gif|png|html)$ - [QSA,PT,L]
     RewriteRule ".*/WEB-INF/?.*" - [L,F,NC]
     RewriteRule \.(jsp|jspx|do) "http://localhost:8080%{REQUEST_URI}"; [QSA,P,L] 
     RewriteRule ".*/servlet/.*" "http://localhost:8080%{REQUEST_URI}"; [QSA,P,L] </Location>
  <Location "/helpdesk">


-- 
Brian Millett
"...which leads me to believe that the ancient race described in our holy
 books may have returned. If true, this holds grave danger for all of us."
           -- [ G'Kar, "Revelations"]

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux