Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'd like to setup a squid instance to do selective reverse proxy for a configured list of URLs whilst acting as a normal forward proxy for everything else.

We are building new infrastructure, parallel live as it where, and I want to have a proxy that people can use that will force selective traffic into the new platform whilst just acting as a forward proxy for anything else. This makes it very easy for people/systems to test the portions of the new platform we want without having to change too much, just use a proxy address.

Is such a setup possible ?

share|improve this question

1 Answer 1

The following seems to work for me, anything for www.myurl.com gets sent to the new servers and everything else is proxied as normal.

# Setup a cache peer as an origin server 
# Duplicate this line for each site you want to reverse for and give it a new name
cache_peer <new platform ip or fqdn> parent 80 0 no-query originserver proxy-only name=upstream1

# Set the domain the cache_peer should handle
cache_peer_domain upstream1 www.myurl.com

# Duplicate following three lines
# Add as many acl lines as necessary for all domains handled
acl our_sites  dstdomain www.myurl.com
cache_peer_access upstream1_sites allow our_sites
cache_peer_access upstream1_sites deny all 
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.