New answers tagged


The selected answer is not entirely correct (at least for Varnish 3, apache on AWS, you need to place varnish settings in like this: sub vcl_recv { set req.backend = dsbalancer; if (req.restarts == 0) { if (req.http.x-forwarded-for) { set req.http.X-Forwarded-For = req.http.X-Forwarded-For; } else { set req.http.X-...


In Varnish 4, req.request became req.method.


You can put it on the same box as haproxy. It makes a lot of sense to put it there, actually. So the question becomes before or after haproxy. If you put it before, then in addition to the rules to protect your app, you will also have to put in rules to protect/allow your static assets. If you put it after, you don't have to worry about rules for your ...


The probe just checks the header returned. Thus you can have ohne script /probe.php which first sends a request to /healthcheck.php and afterwards another one to index.php. Inside /probe.php you can use $headers = get_headers($url,1); and analyze for a 40X or 50X return code on each of the urls. At the end: if($atleastOneOfTheUrlsReturnedSomeThingBad){ ...

Top 50 recent answers are included