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've setup Varnish as a reverse proxy on port 80 before Apache 2.2.22 + VirtualHosts on port 81.

When I enter my websites from port 81 it's all ok, then when I try to enter from port 80 I got Apache2 Test Page.

I'm running only one backend (all on the same machine).

What should I add to my Varnish config to support all Apache VirtualHosts ? I would like to have such universal rule that will add all new domains without having to change my Varnish config each time.

On Lighttpd + virtual hosts everything was running out of a box.

share|improve this question

Check VirtualHost configuration, probably your vhost is configured only for *:81 but should be for *:80 too.

share|improve this answer
Shouldn't they all be on port 81 ? I think I need to change NameVirtualHost external IP to – Spacedust Mar 7 '12 at 23:28
I found a solution - Varnish was looking for webserver at, so the only possible way to fix this is to change virtualhosts to or change Varnish to external IP. – Spacedust Mar 7 '12 at 23:48

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.