diff options
author | Johannes Löthberg <johannes@kyriasis.com> | 2024-06-07 14:43:52 +0200 |
---|---|---|
committer | Johannes Löthberg <johannes@kyriasis.com> | 2024-06-07 14:43:52 +0200 |
commit | d190afd6d525e66587e0f7c46b308de524afb4cc (patch) | |
tree | 12faf8db3feb3930f3ea7806c8c36689be34db48 /nginx | |
parent | 7a628d0adcaa6e5db00ddcbe7972b165ade2790e (diff) | |
download | pillar-d190afd6d525e66587e0f7c46b308de524afb4cc.tar.xz |
Add www. redirects to pie-in-the-sky.kitchen
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Diffstat (limited to 'nginx')
-rw-r--r-- | nginx/pie_in_the_sky_kitchen.sls | 7 |
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 |