diff --git a/conf/nginx.conf b/conf/nginx.conf index 7854cab..f9431e9 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,5 +1,7 @@ -location / { - proxy_pass http://localhost:__PORT__/; +#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; +location __PATH__/ { + + proxy_pass http://127.0.0.1:__PORT__/; proxy_http_version 1.1; proxy_set_header Host $host; diff --git a/scripts/install b/scripts/install index 3fb432e..1041919 100755 --- a/scripts/install +++ b/scripts/install @@ -33,13 +33,15 @@ ynh_secure_remove "$install_dir/server" #================================================= ynh_script_progression --message="Adding configuration file..." --weight=1 -ynh_add_config -t "server.yml" -d "$install_dir/server.yml" +ynh_add_config --template="server.yml" --destination="$install_dir/server.yml" #================================================= # SYSTEM CONFIGURATION #================================================= ynh_script_progression --message="Adding system configurations related to $app..." --weight=1 +ynh_add_nginx_config + ynh_add_systemd_config yunohost service add $app --description="Open Source Push Notification Server" --log="/var/log/$app/$app.log"