1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/onlyoffice_ynh.git synced 2024-09-03 19:56:11 +02:00

Fix sub_path

This commit is contained in:
yalh76 2019-02-27 03:17:55 +01:00
parent 55ea5a9000
commit 9f4b3eca57
3 changed files with 13 additions and 1 deletions

View file

@ -3,7 +3,7 @@ location ^~ __PATH__/ {
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $proxy_connection; proxy_set_header Connection $proxy_connection;
proxy_set_header X-Forwarded-Host $server_name__PATH__; proxy_set_header X-Forwarded-Host $server_name__SUB_PATH__;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off; proxy_redirect off;

View file

@ -163,6 +163,12 @@ ynh_app_setting_set $app final_path $final_path
ynh_print_info "Configuring nginx web server..." ynh_print_info "Configuring nginx web server..."
### `ynh_add_nginx_config` will use the file conf/nginx.conf ### `ynh_add_nginx_config` will use the file conf/nginx.conf
if [ $path = "/" ]
then
ynh_replace_string "__SUB_PATH__" "" "..conf/nginx.conf"
else
ynh_replace_string "__SUB_PATH__" "$path" "..conf/nginx.conf"
fi
# Create a dedicated nginx config # Create a dedicated nginx config
ynh_add_nginx_config "nextclouddomain" ynh_add_nginx_config "nextclouddomain"

View file

@ -77,6 +77,12 @@ path_url=$(ynh_normalize_url_path $path_url)
ynh_print_info "Upgrading nginx web server configuration..." ynh_print_info "Upgrading nginx web server configuration..."
# Create a dedicated nginx config # Create a dedicated nginx config
if [ $path = "/" ]
then
ynh_replace_string "__SUB_PATH__" "" "..conf/nginx.conf"
else
ynh_replace_string "__SUB_PATH__" "$path" "..conf/nginx.conf"
fi
ynh_add_nginx_config "nextclouddomain" ynh_add_nginx_config "nextclouddomain"
#================================================= #=================================================