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:
parent
55ea5a9000
commit
9f4b3eca57
3 changed files with 13 additions and 1 deletions
|
@ -3,7 +3,7 @@ location ^~ __PATH__/ {
|
|||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
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-For $proxy_add_x_forwarded_for;
|
||||
proxy_redirect off;
|
||||
|
|
|
@ -163,6 +163,12 @@ ynh_app_setting_set $app final_path $final_path
|
|||
ynh_print_info "Configuring nginx web server..."
|
||||
|
||||
### `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
|
||||
ynh_add_nginx_config "nextclouddomain"
|
||||
|
|
|
@ -77,6 +77,12 @@ path_url=$(ynh_normalize_url_path $path_url)
|
|||
ynh_print_info "Upgrading nginx web server configuration..."
|
||||
|
||||
# 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"
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue