1

I have Varnish setup for a server that serves multiple webservices. Now I wanted to remove one of these webservices, so I removed the files for this webservice from the server, removed the Apache VirtualHost for this webservice and restarted Apache. However, requests to this webservice still give back responses.

So I figured this data was still cached in Varnish and all I had to do was clear this cached data. But this did not work. The commands I have tried are the following:

  • varnishadm -T :6082 -S /etc/varnish/secret "ban.url /"
  • varnishadm -T :6082 -S /etc/varnish/secret "ban.url ."
  • varnishadm -T :6082 -S /etc/varnish/secret "ban req.http.host ~ DOMAIN"
  • varnishadm -T :6082 -S /etc/varnish/secret "ban req.http.host == DOMAIN"

I also restarted the Varnish service, but to no effect.

I am not really familiar with Varnish, but these were some commands I found after googling for how to clear the Varnish cache. But maybe I am missing something simple?

0

As a workaround I have recreated the VirtualHost, but removed all the files from its document root. This way Varnish returns the correct 404 Not Found responses. This is sufficient for my situation, but it is not a really nice solution.

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.