I am looking to set up something like this:
[internet]----[static mirror]----[dynamic back-end]
In this case, the publicly available web server is running a static cache of a web-site. The static cache may be updated periodically with content from a dynamic back end. I am thinking of both performance and security in mind.
It may not be suitable for a reverse caching proxy like varnish because if the back-end goes does for prolonged periods, varnish will also cache the error. However, this may be cause by my lack of understanding for the tool.
The closest that I can think of is to use httrack to mirror the content periodically and then to serve that content using any normal web server including proxytrack.
I was wondering if anyone knows the right tools to use?
Varnish is the correct tool for this -- it won't cache errors unless you configure it to do so. You might want to look into why your backend webserver is so unreliable, though.
Squid is the other option for this, it also won't cache errors (or redirects) and can be set to "offline mode" so it won't try and refresh.
Just using
rsync
isn't too bad.