Tag Info

New answers tagged

0

The main thing is that you have your director set up with probing, so it actually has a health status on your backends. If that is the case, then you could just use something like the following: sub vcl_recv { if (req.url ~ "healthcheck.html") { if (!req.backend.healthy) { error 503 "No backends available"; } else { ...


2

You have to disable PHP's session autostarting, and start sessions only when users log in. This way PHP doesn't set PHPSESSID cookie for non-logged-in users, which lets Varnish cache those pages.


2

If you're not caching or performing content switching (making "routing" decisions based on HTTP URL or headers) why would you need to use something that far up the stack. Just use IPtables to NAT the connections.


0

Why install an additional cache when the server you have already has one integrated? I am not using Magento but similar to Wordpress I am sure it uses many cookies. Varnish will strip all of those unless you tell it to. From my experience you should disable Varnish and enable the Nginx cache to avoid many headaches. proxy_buffer on; Make sure to ...


0

You're trying to install packages meant for EL6 onto EL7. This will not work and there is no way to make it work. They are not compatible. If you really want to run an old Varnish version, then use EL6 to begin with. The version of varnish included with EPEL for EL7 is 4.0, so it is not likely there will ever be 3.0 built for EL7.


1

1) Yes 2) The entire point of a return is that you skip parts of the code, that you stop it running through unneeded code (hashing, passing, missing). If you need to run it, either a) Copy the code you need executed before the return or b) Use a massive wrapper if. Personally, I tend to duplicate and replace all of the built-in vcl for everything but the ...


0

You can control Nginx's cache expiration with multiple directives/parameters: proxy_cache_valid 200 302 10m; adding one of the HTTP headers below (priority is important - check out my blog post): Expires Cache-Control X-Accel-Expires the inactive parameter in the proxy_cache_path directive: proxy_cache_path /data/nginx/cache keys_zone=one:10m ...



Top 50 recent answers are included