You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Christoph Anton Mitterer <ca...@scientia.net> on 2012/12/09 00:45:05 UTC

[users@httpd] how to use ProxyPassReverse* with more complex a ProxyPassMatch

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.

Re: [users@httpd] how to use ProxyPassReverse* with more complex a ProxyPassMatch

Posted by Tom Evans <te...@googlemail.com>.
On Sat, Dec 8, 2012 at 11:45 PM, Christoph Anton Mitterer
<ca...@scientia.net> 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.

Use ProxyPassReverse, or simplify your application's urlspace such
that you can use ProxyPassReverse. You may have to explain why you
cannot use ProxyPassReverse, eg by supplying a sample scenario.

Cheers

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] how to use ProxyPassReverse* with more complex a ProxyPassMatch

Posted by Christoph Anton Mitterer <ca...@scientia.net>.
Hi Brian.

On Sun, 2012-12-09 at 07:48 -0600, Brian Millett wrote:
>   <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">

AFAICS, this is just the "normal" reverse-proxying which I already set
up with ProxyPassMatch... what I was talking about is what the
ProxyPassReverse* directives do, e.g. rewriting of Location,
Content-Location headers and of cookies.

AFAIK, RewriteRule [P] doens't do this.


Cheers,
Chris.

Re: [users@httpd] how to use ProxyPassReverse* with more complex a ProxyPassMatch

Posted by Brian Millett <bm...@gmail.com>.
On Sun, 09 Dec 2012 00:45:05 +0100
Christoph Anton Mitterer <ca...@scientia.net> 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@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org