1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/converse_ynh.git synced 2024-09-03 18:25:53 +02:00
This commit is contained in:
ericgaspar 2021-01-30 13:46:56 +01:00
parent fde03cdc57
commit bf3aa84dec
No known key found for this signature in database
GPG key ID: 574F281483054D44
2 changed files with 22 additions and 20 deletions

View file

@ -1,27 +1,29 @@
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ { location __PATH__/ {
# Path to source # Path to source
alias __FINALPATH__/; alias __FINALPATH__/;
index index.html; index index.html;
# Force usage of https # Force usage of https
if ($scheme = http) { f ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent; rewrite ^ https://$server_name$request_uri? permanent;
} }
location __PATH__/http-bind { location = __PATH__/http-bind {
if ($scheme = http) { proxy_pass http://localhost:5290/http-bind;
rewrite ^ https://$server_name$request_uri? permanent; proxy_redirect off;
} proxy_set_header Host $host;
proxy_pass http://127.0.0.1:5290/http-bind; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off; proxy_set_header X-Forwarded-Host $server_name;
tcp_nodelay on; proxy_set_header X-Forwarded-Port $server_port;
access_log off;
}
# Include SSOWAT user panel. proxy_set_header Upgrade $http_upgrade;
include conf.d/yunohost_panel.conf.inc; proxy_set_header Connection “upgrade”;
}
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
} }

View file

@ -59,7 +59,7 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path
# Download, the source from sources folder # Download, the source from sources folder
mkdir -p $final_path && cp -a ../sources/* $final_path mkdir -p $final_path && cp -a ../sources/* $final_path
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$final_path/index.html" ynh_replace_string --match_string="__DOMAIN____PATH__" --replace_string="$domain$path_url" --target_file="$final_path/index.html"
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION