The Varnish docs state that Varnish is configured by default on port 6081, which is "great for testing purposes." https://www.varnish-cache.org/docs/trunk/tutorial/putting_varnish_on_port_80.html

I am running multiple virtual hosts, and while I'm becoming familiar with Varnish, I'd like to keep it on :6081.

I changed my default.vcl .host to be localhost:80

I assumed that I could test varnish through :6081, listening to the backend server at the default :80 port all the while the rest of the world would still continue to receive the non varnish version as they normally would on port 80.

However, I keep getting the following error: "Error 503 Backend fetch failed"

What could I be doing wrong? I went through the tutorial and everything worked as the tutorial indicated.


The answer was to make sure that the .host parameter in default.vcl was the same as the Listen parameter in httpd.conf. The ip addresses needed to be the same.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.