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; }