summaryrefslogtreecommitdiffstats
path: root/nginx
diff options
context:
space:
mode:
Diffstat (limited to 'nginx')
-rw-r--r--nginx/pie_in_the_sky_kitchen.sls7
1 files changed, 5 insertions, 2 deletions
diff --git a/nginx/pie_in_the_sky_kitchen.sls b/nginx/pie_in_the_sky_kitchen.sls
index a5fbd1e..4f42d5f 100644
--- a/nginx/pie_in_the_sky_kitchen.sls
+++ b/nginx/pie_in_the_sky_kitchen.sls
@@ -12,8 +12,7 @@ nginx:
- location /.well-known/acme-challenge:
- root: /srv/http
- - location /:
- - return: '301 https://$server_name$request_uri'
+ - rewrite: ^(.*) https://$server_name$1 permanent
- server:
@@ -55,6 +54,10 @@ nginx:
- location /.well-known/acme-challenge:
- root: /srv/http
+ # Redirect www. to non-www.
+ - "if ($host != $server_name)":
+ - rewrite: ^(.*) https://$server_name$1 permanent
+
- location /:
- proxy_http_version: '1.1'
- proxy_pass: http://127.0.0.1:6344