From 488b50d54d89777be8034c498627078df3e62951 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Kar=C3=A9kinian?= Date: Fri, 9 Jun 2017 21:19:28 +0200 Subject: [PATCH] Just use plain HTTP in development environment --- .../kosmos-wordpress/templates/default/nginx.conf.erb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/site-cookbooks/kosmos-wordpress/templates/default/nginx.conf.erb b/site-cookbooks/kosmos-wordpress/templates/default/nginx.conf.erb index 3477c1b..930e05a 100644 --- a/site-cookbooks/kosmos-wordpress/templates/default/nginx.conf.erb +++ b/site-cookbooks/kosmos-wordpress/templates/default/nginx.conf.erb @@ -15,6 +15,7 @@ server { location / { try_files $uri $uri/ /index.php?$args; + <% if File.exist?(@ssl_cert) && File.exist?(@ssl_key) -%> set $redirect_to_ssl "no"; if ($ssl_protocol = "") { set $redirect_to_ssl "yes"; @@ -22,6 +23,7 @@ server { if ($redirect_to_ssl = yes) { rewrite ^(.*) https://$host$1 permanent; } + <% end -%> } location ~ \.php$ {