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

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have an existing web application at The marketing team has a hosted Drupal instance at Is there a reverse-proxy solution that would allow me to serve up the marketing content from

I would like to do this with networking infrastructure changes only; ie NOT changing either the marketing site base url configuration, or adding code to

In Varnish, I can do something like:

if (req.url ~ "^/marketing/") {
  set = "";
  set req.url = regsub(req.url, "^/marketing/", "/");

However, is serving up HTML with absolute links like "/blog", that now need to be updated to "/marketing/blog". Could the reverse proxy re-write these links, but keep asking the marketing backend for "/blog"?

Again, I don't want to change the configuration of the marketing site to respond to the new URL format itself. I want the reverse proxy to handle all that.

Right now we're using Varnish, but I'm open to other solutions.

share|improve this question

Varnish can not touch and rewrite the contents being served (only the headers). Maybe the latest and greatest version (3.x) can do it with some VMOD, but I doubt that.

Maybe a setup like the Upside-Down-Ternet ( with squid will help you, what kind of performance are you looking at?

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.