1

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.

Spacedust
  • 568
  • 5
  • 13
  • 28

1 Answers1

0

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

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