RE: Map a subfolder in a virtualhost (with remote proxy) to a local folder

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

 



Thanks a lot Tom. 
Your solution works exactly the way I needed :)

-----Original Message-----
From: Tom Evans [mailto:tevans.uk@xxxxxxxxxxxxxx] 
Sent: Tuesday, September 11, 2012 9:56 PM
To: users@xxxxxxxxxxxxxxxx
Subject: Re:  Map a subfolder in a virtualhost (with remote proxy) to a local folder

On Tue, Sep 11, 2012 at 4:53 PM, Bhattacharya, Sudip <sudip.bhattacharya@xxxxxxxxxxx> 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@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


This e-mail (and any attachments), is confidential and may be privileged. It may be read, copied and used only
by intended recipients. Unauthorized access to this e-mail (or attachments) and disclosure or copying of its 
contents or any action taken in reliance on it is unlawful. Unintended recipients must notify the sender immediately 
by e-mail/phone & delete it from their system without making any copies or disclosing it to a third person.


---------------------------------------------------------------------
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