From df90c175ea4719588208255e801ff68a8e2cc775 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 8 Aug 2021 10:37:10 +0200 Subject: [PATCH] fix --- conf/nginx.conf | 7 +++++++ conf/systemd.service | 2 +- scripts/install | 6 +++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 4f09f2d..38ca187 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -21,3 +21,10 @@ location __PATH__/ { # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; } + +location ~ .*.(gif|jpg|jpeg|png|bmp|swf|css|js)$ { + proxy_pass http://127.0.0.1:__PORT__; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $remote_addr; + } +} diff --git a/conf/systemd.service b/conf/systemd.service index 95964c8..3558627 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -8,7 +8,7 @@ User=__APP__ Group=__APP__ StartLimitInterval=5 StartLimitBurst=10 -ExecStart=__FINALPATH__/AdGuardHome -s start -c __FINALPATH__/AdGuardHome.yaml -p __PORT__ +ExecStart=__FINALPATH__/AdGuardHome -s start -c __FINALPATH__/AdGuardHome.yaml -w __FINALPATH__ -h 127.0.0.1 -p __PORT__ WorkingDirectory=__FINALPATH__ #StandardOutput=file:/var/log/__APP__.out #StandardError=file:/var/log/__APP__.err diff --git a/scripts/install b/scripts/install index 1067442..4828956 100644 --- a/scripts/install +++ b/scripts/install @@ -116,8 +116,8 @@ chown -R $app:$app "$final_path/AdGuardHome.yaml" ynh_script_progression --message="Configuring a systemd service..." --weight=1 # Create a dedicated systemd config -ynh_add_systemd_config -#$final_path/AdGuardHome --service install -c $final_path/AdGuardHome.yaml -p $port +#ynh_add_systemd_config +$final_path/AdGuardHome --service install -c __FINALPATH__/AdGuardHome.yaml -w __FINALPATH__ -h 127.0.0.1 -p __PORT__ #================================================= # GENERIC FINALIZATION @@ -134,7 +134,7 @@ yunohost service add $app --description="" ynh_script_progression --message="Starting a systemd service..." --weight=2 # Start a systemd service -ynh_systemd_action --service_name=$app --action="restart" --log_path=systemd --line_match="Version:" +ynh_systemd_action --service_name=$app --action="restart" --log_path=systemd #================================================= # SETUP SSOWAT