New answers tagged

0

You're right, adding new cookies that aren't required for caching will not impact your VCL configuration. Varnishlog output When in doubt, use varnishlog. Here's a command you can use to monitor the cookie behavior: varnishlog -g request -i ReqUrl -I ReqUnset:Cookie -I ReqHeader:Cookie This command will only display the URL of the request and the various ...


0

The X-Forward-For header should contain the client IP address. This header will be set by Nginx and will also be used by Varnish. It is possible that the X-Forward-For header looks like this: X-Forwarded-For: 1.2.3.4, 5.6.7.8 It's a matter of extracting the first value and matching that in your .htaccess file. This article provides an easy way to perform ...


0

I just found a solution, which is to use this instead <Files wp-login.php> SetEnvIf X-Forwarded-For %Client_IP% allow_me Allow from env=allow_me deny from all </Files> I can also put the SetEnvIf outside, i.e. at the top of the htaccess file, and just change the ip on this line every time my IP changes. SetEnvIf X-Forwarded-For %Client_IP% ...


0

The problem could be related to the lack of protocol awareness when it comes to caching. It's quite typical that an HTTP request that should be redirected to an HTTPS request ends up in the cache, which unconditionally redirects users to the HTTPS version, even if they actually requested an HTTPS version. There are various ways to fix this depending on the ...


0

I think there's a bug in Varnish Book when it comes to explaining how to log headers. Try this: varnishncsa -F '<%{age}o> <%{x-cache}o> %U %s'


Top 50 recent answers are included