Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Here's the setup. We have a hardware load balancer with an http virtual cluster. Let's call this virtual cluster This virtual cluster load balances between two squid reverse proxies which are also on the same physical servers as the web servers. Squid listens on 80 and points to itself as the cache_peer web server which listens on 81. We also have a standalone web server which we will call

What we are trying to do is create a subdirectory on called This will point to, but we want our users to stay at in their browser. So, it's like a redirect without actually being a redirect. How the hell do I go about doing this? Is this even possible? I'm looking at squid docs in the meantime.

  • is running a proprietary web server - not Apache :(
  • We can't host's content in's file system. These are two very different platforms.
share|improve this question
Almost need a picture here or something. Your setup is pretty complex. Since I am not sure I have fully grasped your setup, I am not sure if I can provide a valid answer. But have you looked at using the redirection features within Squid? When squid redirects it is transparent to the end user. See: –  Zoredache Nov 30 '12 at 23:28

2 Answers 2

I might be missing something here, but this actually sounds pretty straight forward. Load balance all requests where the URL path matches ^/example2/ to the web server.

Move all website content from the directory root to a subdirectory called /example2/ on the web server.

share|improve this answer
Mathias, you are absolutely correct. I incorporated some of your answer into my config file. Thanks. –  Coobadivin Dec 4 '12 at 16:08
up vote 0 down vote accepted

I got it working. I reconfigured squid to use a urlpath_regex acl and set up as a secondary cache peer. Then I set to allow /example2, but deny all others. Then for, I set it to deny /example2. It's working as intended. Here's what the config file looks like.

acl redirect urlpath_regex ^/example2*

cache_peer parent 81 0 no-query originserver name=server1
cache_peer parent 80 0 no-query originserver name=server2

cache_peer_access server1 deny redirect
cache_peer_access server2 allow redirect
cache_peer_access server2 deny all

If I go to, it's pulling the content from, but the URL remains in the browser.

share|improve this answer

Your Answer


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.