Posted by lobo235 on February 25, 2011 at 9:15pm
I've got an issue with varnish on my mercury server. I have a site that is located outside of /var/www so I setup a new apache vhost for the site that points to it's proper location and configured it to run on port 8080. When I try to visit the site through varnish on port 80 the default site comes up instead of the site i am expecting. When I visit the site on port 8080 it works fine. Is there something I need to do to varnish to make it aware that the site is not in /var/www? Any help would be appreciated.
Comments
Restart Varnish
If you didn't try restarting the varnish daemon to flush the caches.
Other thoughts:
Putting the site outside /var/www shouldn't matter, so long as the vhost has the right docroot. I would be sure that you're reaching the correct virtualhost on the backend: try placing a little "Hello World" text file next to index.php and request that. If not, you should examine varnishlog while making a few requests and see why Apache is serving the wrong vhost when the request comes via Varnish rather than directly on port 8080.
https://pantheon.io | http://www.chapterthree.com | https://www.outlandishjosh.com