From 40ccf765e5abf69d21589659926597b0a6237f52 Mon Sep 17 00:00:00 2001 From: pjv Date: Mon, 3 Nov 2014 14:57:50 -0600 Subject: [PATCH 1/2] fix for robots.txt location Allow wordpress to generate robots.txt file if static file does not exist --- config/nginx/common/locations.conf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config/nginx/common/locations.conf b/config/nginx/common/locations.conf index d6495a85..0c5623e1 100644 --- a/config/nginx/common/locations.conf +++ b/config/nginx/common/locations.conf @@ -9,8 +9,9 @@ location = /favicon.ico { } location = /robots.txt { - access_log off; - log_not_found off; + try_files $uri $uri/ /index.php?$args; + access_log off; + log_not_found off; } # Cache static files From 9a2e72e327ff52c02bc7f9ccca78845dfbce964e Mon Sep 17 00:00:00 2001 From: pjv Date: Mon, 3 Nov 2014 15:03:21 -0600 Subject: [PATCH 2/2] whitespace --- config/nginx/common/locations.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/nginx/common/locations.conf b/config/nginx/common/locations.conf index 0c5623e1..3265ae25 100644 --- a/config/nginx/common/locations.conf +++ b/config/nginx/common/locations.conf @@ -9,9 +9,9 @@ location = /favicon.ico { } location = /robots.txt { - try_files $uri $uri/ /index.php?$args; - access_log off; - log_not_found off; + try_files $uri $uri/ /index.php?$args; + access_log off; + log_not_found off; } # Cache static files