From e03634966160dc7a3c6a749330395bbd5908a0c6 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Mon, 12 Sep 2016 20:57:10 +0300 Subject: [PATCH] roles/nginx: Only check WordPress variables is vhost is using WordPress This variable is used to control the FastCGI cache, and doesn't need to be checked if the vhost isn't using WordPress. --- roles/nginx/templates/vhost.conf.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/nginx/templates/vhost.conf.j2 b/roles/nginx/templates/vhost.conf.j2 index 0476600..6eb0902 100644 --- a/roles/nginx/templates/vhost.conf.j2 +++ b/roles/nginx/templates/vhost.conf.j2 @@ -91,6 +91,7 @@ server { include extra-security.conf; } +{% if has_wordpress == True %} # Check if a user is logged in # if so, set $wordpress_logged_in = 1 # otherwise, set $wordpress_logged_in = 0 @@ -102,3 +103,4 @@ map $http_cookie $wordpress_logged_in { ~wordpress_logged_in 1; } +{% endif %}