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.

1 Answer 1

0

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

2
  • 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 7, 2012 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 7, 2012 at 23:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .