From e348a48dd230c6f574b78b5619a243facc5f42d4 Mon Sep 17 00:00:00 2001 From: ljf Date: Wed, 14 Dec 2016 10:11:43 +0100 Subject: [PATCH] [enh] Force https --- conf/nginx.conf | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index b304052..90d828a 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,5 +1,11 @@ location / { - proxy_pass http://127.0.0.1:8069/; + if ($scheme = http) { + rewrite ^ https://$server_name$request_uri? permanent; + } + try_files $uri @#YNH_APP_INSTANCE_NAME#; +} +location @#YNH_APP_INSTANCE_NAME# { + proxy_pass http://127.0.0.1:8069; proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504; proxy_buffers 16 64k; proxy_buffer_size 128k;