From 40d46b3cba72c677cf548836bf22d7f74335eb99 Mon Sep 17 00:00:00 2001 From: liberodark Date: Mon, 11 Feb 2019 23:06:13 +0100 Subject: [PATCH] update --- conf/nginx.conf | 25 +++++++++++++------------ scripts/install | 4 ++-- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 4193bce..88e8f34 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,13 +1,14 @@ -location ^~ __PATH__/ { - proxy_pass http://127.0.0.1:__PORT__; - proxy_redirect off; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Host $server_name; - - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; +#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; +location __PATH__/ { + + # Path to source + alias __FINALPATH__/ ; + + # Force usage of https + if ($scheme = http) { + rewrite ^ https://$server_name$request_uri? permanent; +} + index index.htm; + # Include SSOWAT user panel. + include conf.d/yunohost_panel.conf.inc; } \ No newline at end of file diff --git a/scripts/install b/scripts/install index 0b8bedc..ca34a05 100644 --- a/scripts/install +++ b/scripts/install @@ -76,9 +76,9 @@ ynh_app_setting_set $app is_public $is_public ### - Remove the section "CLOSE A PORT" in the remove script # Find a free port -port=$(ynh_find_port 8096) +port=$(ynh_find_port 80) # Open this port -yunohost firewall allow --no-upnp TCP $port 2>&1 +#yunohost firewall allow --no-upnp TCP $port 2>&1 ynh_app_setting_set $app port $port #=================================================