Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

I set up an apache and a varnish on a dedicated server, which runs on debian squeeze.

Sometimes the varnish redirects to the apache backend port 8000. In this case the browser show i.e. and has no connection to the server and no content will be displayed. I guess the problem is caused by my apache or varnish configs, which are both are very basic.

The varnish runs on port 80 The apache runs on port 8000

Here some examples: -> (works! The shop is displayed correctly) -> (no connection to server;no content) -> (works!)

The shop, which I am using, is shopware. I thought about editing the .htaccess in den shop directory, but that didn't work. So I am using the standard shopware .htaccess.

If it helps, I can post my config files (varnish/apache) or the correct url of my server.

I would be very thankful for any advice. I running out of ideas.

Thank in advanced! Michael

share|improve this question

This is a problem from Apache. Apache tries to canonicalize Urls.

The Url "" is different from "" (with trailing slash). Still most of the time the same resource is desired.

Apache tries to rewrite the urls without trailing slash so they point to the urls with trailing slash.

Now there the probleme is that you have your server running on port 8000 so apache adds this too.

There are two options from my perspective:

  1. Run the Apache on port 80
  2. Set "UseCanonicalName Off" in your apache conf and build an own rewrite to point the Urls without trailing slash to the right point.
share|improve this answer
Yeah, thanks! You pointed in the right direction. I set the ServerName to and now it works – Michi Qne Jun 20 '12 at 13:17
Nice to hear that I could help :) – Christopher Perrin Jun 20 '12 at 13:23
If Apache is running on port 80, Varnish cannot be run on same port. – Raptor Jul 27 '15 at 3:57

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.