From 8b2d61627be808f6a34dd4542667f5cffbc798d6 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 18 Oct 2020 13:29:13 +0200 Subject: [PATCH] Add .htaccess config --- conf/nginx.conf | 4 ++-- scripts/install | 8 ++++++++ scripts/upgrade | 8 ++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 7a947c5..0db689a 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -11,9 +11,9 @@ location __PATH__/ { index index.php; - #if (!-e $request_filename) { rewrite ^ /bludit/index.php last; } + if (!-e $request_filename) { rewrite ^ __PATH__/index.php last; } - try_files $uri $uri/ /bludit//bludit/index.php?$args; + #try_files $uri $uri/ /bludit//bludit/index.php?$args; location __PATH__/bl-content/databases/ { deny all; } location __PATH__/bl-content/workspaces/ { deny all; } diff --git a/scripts/install b/scripts/install index 4276fe2..f340a82 100644 --- a/scripts/install +++ b/scripts/install @@ -83,6 +83,14 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies" phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +#================================================= +# CONFIGURE BLUDIT +#================================================= +ynh_script_progression --message="Configuring .htaccess..." --weight=1 + +# Change variables in ttrss configuration +ynh_replace_string --match_string="on" --replace_string="off" --target_file="$final_path/.htaccess" + #================================================= # SECURE FILES AND DIRECTORIES #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 6f1179f..5a5b492 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -94,6 +94,14 @@ then ynh_setup_source --dest_dir=$final_path fi +#================================================= +# CONFIGURE BLUDIT +#================================================= +ynh_script_progression --message="Configuring .htaccess..." --weight=1 + +# Change variables in ttrss configuration +ynh_replace_string --match_string="on" --replace_string="off" --target_file="$final_path/.htaccess" + #================================================= # SECURE FILES AND DIRECTORIES #=================================================