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

Change url: Update trusted hosts (#119)

* Testing 5.0.3~ynh1 (#117)

* Upgrade to v5.0.3 (#116)

Co-authored-by: OniriCorpe <oniricorpe@yunohost.org>

* Auto-update READMEs

---------

Co-authored-by: YunoHost Bot <yunohost-bot@users.noreply.github.com>
Co-authored-by: eric_G <46165813+ericgaspar@users.noreply.github.com>
Co-authored-by: yunohost-bot <yunohost@yunohost.org>

* Update change_url

Update trusted_hosts in config.ini.php

* Update scripts/change_url

Co-authored-by: Tagada <36127788+Tagadda@users.noreply.github.com>

* Update change_url

Create config.ini.php if it doesn't exist

* Update change_url

Only alter config file if it exists

* Update nginx.conf

---------

Co-authored-by: OniriCorpe <oniricorpe@yunohost.org>
Co-authored-by: YunoHost Bot <yunohost-bot@users.noreply.github.com>
Co-authored-by: eric_G <46165813+ericgaspar@users.noreply.github.com>
Co-authored-by: yunohost-bot <yunohost@yunohost.org>
Co-authored-by: Tagada <36127788+Tagadda@users.noreply.github.com>
This commit is contained in:
CodeShakingSheep 2024-05-22 01:38:31 -05:00 committed by GitHub
parent 1b8c8ab3c7
commit 978faf643e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 23 additions and 7 deletions

View file

@ -1,5 +1,5 @@
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location ^~ __PATH__/ { location __PATH__/ {
# Path to source # Path to source
alias __INSTALL_DIR__/; alias __INSTALL_DIR__/;
@ -33,27 +33,27 @@ location ^~ __PATH__/ {
} }
## disable all access to the following directories ## disable all access to the following directories
location ^~ __PATH__/config/ { location ~ ^__PATH__/config/ {
deny all; deny all;
return 403; return 403;
} }
location ^~ __PATH__/tmp/ { location ~ ^__PATH__/tmp/ {
deny all; deny all;
return 403; return 403;
} }
location ^~ __PATH__/core/ { location ~ ^__PATH__/core/ {
deny all; deny all;
return 403; return 403;
} }
location ^~ __PATH__/lang/ { location ~ ^__PATH__/lang/ {
deny all; deny all;
return 403; return 403;
} }
location ~ __PATH__/\.ht { location ~ ^__PATH__/\.ht {
deny all; deny all;
return 403; return 403;
} }
@ -78,7 +78,7 @@ location ^~ __PATH__/ {
} }
## properly display textfiles in root directory ## properly display textfiles in root directory
location ~__PATH__/(.*\.md|LEGALNOTICE|LICENSE) { location ~ ^__PATH__/(.*\.md|LEGALNOTICE|LICENSE) {
default_type text/plain; default_type text/plain;
} }

View file

@ -18,6 +18,22 @@ ynh_script_progression --message="Updating NGINX web server configuration..." --
ynh_change_url_nginx_config ynh_change_url_nginx_config
#=================================================
# SPECIFIC MODIFICATIONS
#=================================================
# RECONFIGURING MATOMO
#=================================================
ynh_script_progression --message="Reconfiguring Matomo..." --weight=2
if [[ -f "$install_dir/config/config.ini.php" ]]; then
# config.ini.php is only created during the post-install process...
# it is therefore not present when the CI tests are carried out...
# This condition is only for CI test to go through the upgrade process
# See https://matomo.org/faq/how-to-install/faq_18/
ynh_replace_string --match_string="$old_domain" --replace_string="$new_domain" --target_file="$install_dir/config/config.ini.php"
fi
#================================================= #=================================================
# SETUP A CRON # SETUP A CRON
#================================================= #=================================================