Bypassing ProxyPass/ProxyPassReverse

This is a discussion on Bypassing ProxyPass/ProxyPassReverse within the Apache Web Server forums, part of the Web Server and Related Forums category; Greetings, I am using apache as a reverse proxy back to several other servers. Requests in one subdirectory go to ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-15-2006
sdavison@hotmail.com
 
Posts: n/a
Default Bypassing ProxyPass/ProxyPassReverse

Greetings,

I am using apache as a reverse proxy back to several other servers.
Requests in one subdirectory go to one server, while another proxy to a
second server. Any requests that don't fall into those subdirectories
get proxied to a third server.

My question is, how would I bypass the proxy rules altogether for a
directory that exists on the proxy server itself? Try as I may, I
cannot make exceptions to the proxypass rules:

RewriteEngine On
ProxyRequests Off

ProxyPass /mail https://server2/art
ProxyPassReverse /mail https://server2/art
ProxyPass /wiki https://server3/clips
ProxyPassReverse /wiki https://server3/clips
ProxyPass / https://server4/
ProxyPassReverse / https://server4/

I've tried using Alias, the Directory and Location directives, but have
had no success.

Thanks,

Simon

  #2 (permalink)  
Old 12-18-2006
petersprc
 
Posts: n/a
Default Re: Bypassing ProxyPass/ProxyPassReverse

Hi,

You can specify an exclamation point as the URL to indicate paths that
shouldn't be proxied. For example, this should prevent /local from
being handled by the proxy:

ProxyPass /local !
ProxyPass https://server4/



sdavison@hotmail.com wrote:
> Greetings,
>
> I am using apache as a reverse proxy back to several other servers.
> Requests in one subdirectory go to one server, while another proxy to a
> second server. Any requests that don't fall into those subdirectories
> get proxied to a third server.
>
> My question is, how would I bypass the proxy rules altogether for a
> directory that exists on the proxy server itself? Try as I may, I
> cannot make exceptions to the proxypass rules:
>
> RewriteEngine On
> ProxyRequests Off
>
> ProxyPass /mail https://server2/art
> ProxyPassReverse /mail https://server2/art
> ProxyPass /wiki https://server3/clips
> ProxyPassReverse /wiki https://server3/clips
> ProxyPass / https://server4/
> ProxyPassReverse / https://server4/
>
> I've tried using Alias, the Directory and Location directives, but have
> had no success.
>
> Thanks,
>
> Simon


  #3 (permalink)  
Old 12-20-2006
sdavison@hotmail.com
 
Posts: n/a
Default Re: Bypassing ProxyPass/ProxyPassReverse

Thanks so much, Peter. It looks to be precisely what I'm looking for.
It is very simple and clean.

However, for me, I get a "HTTP/1.1 400 Bad Request" when I request
"/local". All other requests work as expected, but requests for this
dir name, or files within it, don't.

I did create the directory "local" in the document root, btw.

Any thoughts? I will update this thread when I find the solution.

Thanks again,

Simon

petersprc wrote:
> Hi,
>
> You can specify an exclamation point as the URL to indicate paths that
> shouldn't be proxied. For example, this should prevent /local from
> being handled by the proxy:
>
> ProxyPass /local !
> ProxyPass https://server4/
>
>
>
> sdavison@hotmail.com wrote:
> > Greetings,
> >
> > I am using apache as a reverse proxy back to several other servers.
> > Requests in one subdirectory go to one server, while another proxy to a
> > second server. Any requests that don't fall into those subdirectories
> > get proxied to a third server.
> >
> > My question is, how would I bypass the proxy rules altogether for a
> > directory that exists on the proxy server itself? Try as I may, I
> > cannot make exceptions to the proxypass rules:
> >
> > RewriteEngine On
> > ProxyRequests Off
> >
> > ProxyPass /mail https://server2/art
> > ProxyPassReverse /mail https://server2/art
> > ProxyPass /wiki https://server3/clips
> > ProxyPassReverse /wiki https://server3/clips
> > ProxyPass / https://server4/
> > ProxyPassReverse / https://server4/
> >
> > I've tried using Alias, the Directory and Location directives, but have
> > had no success.
> >
> > Thanks,
> >
> > Simon


 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:02 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0