From 525b738d4528cf4a4e628452ffb6513ca658bc40 Mon Sep 17 00:00:00 2001 From: Ylies Chahi Date: Sun, 13 Aug 2017 01:34:40 +0200 Subject: [PATCH] Update nginx.conf --- conf/nginx.conf | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 3e41b09..f0204ca 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,15 +1,17 @@ -location {LOCATION} { - alias {DESTDIR}/output/; - - index index.html +location YNH_LOCATION { + alias YNH_DOCUMENT_ROOT/output; + + # Force HTTPS + if ($scheme = http) { + rewrite ^ https://$server_name$request_uri? permanent; + } + + index index.html index.htm; + default_type text/html; + try_files $uri $uri.html $uri/ =404; - # Deny access to hidden files and directories - location ~ ^{PATH}/(.+/|)\.(?!well-known\/) { - deny all; - } - - # Include SSOWAT user panel. + # Include SSOwat user panel. include conf.d/yunohost_panel.conf.inc; }