From 0daf25f7542ca0a37ccc366660d49be432dfa089 Mon Sep 17 00:00:00 2001 From: Krakinou Date: Sat, 8 Dec 2018 17:37:56 +0100 Subject: [PATCH] nginx --- conf/nginx.conf | 14 +++----------- scripts/remove | 10 +++++----- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index b864c9b..ce21cf3 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,19 +1,11 @@ -#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; -location __PATH__/ { - - # Path to source - alias __FINALPATH__/ ; +location __PATH__ { # Force usage of https if ($scheme = http) { rewrite ^ https://$server_name$request_uri? permanent; } - proxy_bind $server_adress; - proxy_pass http://127.0.0.1:8083; - proxy_set_header Host $http_host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Scheme $scheme; - proxy_set_header X-Script-Name /__FINALPATH__; + proxy_pass http://localhost:__PORT__; + proxy_set_header X-Forwarded-For $remote_addr; # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; } diff --git a/scripts/remove b/scripts/remove index 69e24ab..c99d8ef 100755 --- a/scripts/remove +++ b/scripts/remove @@ -46,7 +46,7 @@ fi #================================================= # Remove metapackage and its dependencies -ynh_remove_app_dependencies +#ynh_remove_app_dependencies #================================================= @@ -61,7 +61,7 @@ ynh_secure_remove "$final_path" #================================================= # Remove the dedicated nginx config -ynh_remove_nginx_config +#ynh_remove_nginx_config #================================================= # REMOVE LOGROTATE CONFIGURATION @@ -87,13 +87,13 @@ fi #================================================= # Remove a cron file -ynh_secure_remove "/etc/cron.d/$app" +#ynh_secure_remove "/etc/cron.d/$app" # Remove a directory securely -ynh_secure_remove "/etc/$app/" +#ynh_secure_remove "/etc/$app/" # Remove the log files -ynh_secure_remove "/var/log/$app/" +#ynh_secure_remove "/var/log/$app/" #================================================= # GENERIC FINALIZATION