1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/flarum_ynh.git synced 2024-09-03 18:36:24 +02:00

Fix NGINX paths

This commit is contained in:
tituspijean 2020-12-05 12:37:00 +01:00
parent 56ae4e7149
commit c6f33a231c
4 changed files with 1 additions and 27 deletions

View file

@ -11,8 +11,7 @@ location __PATH__/ {
index index.php;
# Bug in Nginx with locations and aliases (see http://stackoverflow.com/a/35102259 )
try_files $uri $uri/ __PATH_HACK__/index.php?$query_string;
#if (!-e $request_filename) { rewrite ^ __PATH_HACK__/index.php last; }
try_files $uri $uri/ __PATH__/__PATH__/index.php?$query_string;
location ~* \.php$ {
fastcgi_split_path_info ^(.+.php)(/.+)$;

View file

@ -29,11 +29,6 @@ ynh_script_progression --message="Loading installation settings..." --weight=1
# Needed for helper "ynh_add_nginx_config"
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
# Add settings here as needed by your application
#db_name=$(ynh_app_setting_get --app=$app --key=db_name)
#db_user=$db_name
#db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd)
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
@ -84,12 +79,6 @@ then
# Set global variables for nginx helper
domain="$old_domain"
path_url="$new_path"
# Bug in Nginx with locations and aliases (see http://stackoverflow.com/a/35102259 )
if [ $path_url = "/" ]; then
ynh_replace_string "__PATH_HACK__" "" "../conf/nginx.conf"
else
ynh_replace_string "__PATH_HACK__" "$path_url" "../conf/nginx.conf"
fi
# Create a dedicated nginx config
ynh_add_nginx_config
fi

View file

@ -97,13 +97,6 @@ ynh_setup_source --dest_dir="$final_path"
# NGINX CONFIGURATION
#=================================================
# Bug in Nginx with locations and aliases (see http://stackoverflow.com/a/35102259 )
if [ $path_url = "/" ]; then
ynh_replace_string "__PATH_HACK__" "" "../conf/nginx.conf"
else
ynh_replace_string "__PATH_HACK__" "$path_url/$path_url" "../conf/nginx.conf"
fi
# Create a dedicated nginx config
ynh_add_nginx_config

View file

@ -160,13 +160,6 @@ fi
#=================================================
ynh_script_progression --message="Upgrading nginx web server configuration..." --weight=1
# Bug in Nginx with locations and aliases (see http://stackoverflow.com/a/35102259 )
if [ $path_url = "/" ]; then
ynh_replace_string "__PATH_HACK__" "" "../conf/nginx.conf"
else
ynh_replace_string "__PATH_HACK__" "$path_url/$path_url" "../conf/nginx.conf"
fi
# Create a dedicated nginx config
ynh_add_nginx_config