1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/phpboost_ynh.git synced 2024-09-03 19:56:33 +02:00
This commit is contained in:
liberodark 2019-02-11 23:06:13 +01:00
parent 7bb9791865
commit 40d46b3cba
2 changed files with 15 additions and 14 deletions

View file

@ -1,13 +1,14 @@
location ^~ __PATH__/ { #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
proxy_pass http://127.0.0.1:__PORT__; location __PATH__/ {
proxy_redirect off;
proxy_set_header Host $host; # Path to source
proxy_set_header X-Real-IP $remote_addr; alias __FINALPATH__/ ;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # Force usage of https
proxy_set_header X-Forwarded-Host $server_name; if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
proxy_http_version 1.1; }
proxy_set_header Upgrade $http_upgrade; index index.htm;
proxy_set_header Connection "upgrade"; # Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
} }

View file

@ -76,9 +76,9 @@ ynh_app_setting_set $app is_public $is_public
### - Remove the section "CLOSE A PORT" in the remove script ### - Remove the section "CLOSE A PORT" in the remove script
# Find a free port # Find a free port
port=$(ynh_find_port 8096) port=$(ynh_find_port 80)
# Open this port # 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 ynh_app_setting_set $app port $port
#================================================= #=================================================