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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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 | |
|
|