httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Evans <tevans...@googlemail.com>
Subject Re: [users@httpd] Map a subfolder in a virtualhost (with remote proxy) to a local folder
Date Tue, 11 Sep 2012 16:25:30 GMT
On Tue, Sep 11, 2012 at 4:53 PM, Bhattacharya, Sudip
<sudip.bhattacharya@genpact.com> wrote:
> I have a VirtualHost entry like below, which routes all requests for http://foo.bar.com
URLs to a remote server http://fooremote.bar.com .
>
> <VirtualHost *>
>     ServerName foo.bar.com
>     ProxyRequests Off
>     ProxyPreserveHost Off
>     <Proxy *>
>         Order deny,allow
>         Allow from all
>     </Proxy>
>

        ProxyPass /images !

>     ProxyPass / http://fooremote.bar.com/
>     ProxyPassReverse / http:// fooremote.bar.com/
> .
> .
> .
>
> Now I want that a subfolder in this domain should be served from local.
> For e.g. http://foo.bar.com/images should serve files from the local server, while rest
of the requests to any hyperlink on foo.bar.com should be passed to the remote server.
>
> Is there any way to achieve it within the VirtualHost section?

See inline; any locations you don't want proxied should come before
those you do, or put another way, more specific locations must appear
before less generic locations.

Cheers

Tom

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


Mime
View raw message