diff --git a/conf/nginx.conf b/conf/nginx.conf
index 551a5fa..9c464eb 100644
--- a/conf/nginx.conf
+++ b/conf/nginx.conf
@@ -1,7 +1,3 @@
-location / {
- try_files $uri $uri/ =404;
-}
-
########
## Jellyfin
@@ -9,10 +5,10 @@ location / {
return 302 $scheme://$host/jellyfin/;
}
- location /jellyfin/ {
+ location __PATH__/ {
# Proxy main Jellyfin traffic
# The / at the end is significant.
- proxy_pass http://127.0.0.1:__PORT__/;
+ proxy_pass http://127.0.0.1:__PORT____PATH__/;
proxy_pass_request_headers on;
diff --git a/scripts/install b/scripts/install
index ab4860a..5f17e40 100644
--- a/scripts/install
+++ b/scripts/install
@@ -168,6 +168,18 @@ cp ../conf/LDAP-Auth.xml "$plugins_conf_file"
ynh_replace_string --match_string="__BINDPASSWORD__" --replace_string="$password" --target_file="$plugins_conf_file"
chown -R jellyfin:jellyfin "$plugins_path"
+# Load services once to generate system.xml
+systemctl enable jellyfin
+systemctl start jellyfin
+sleep 5
+systemctl stop jellyfin
+
+# Port config
+ynh_replace_string --match_string="8096" --replace_string="$port" --target_file="/etc/jellyfin/system.xml"
+
+# BaseUrl
+ynh_replace_string --match_string="" --replace_string="$path_url" --target_file="/etc/jellyfin/system.xml"
+
# Port config
ynh_replace_string --match_string="8096" --replace_string="$port" --target_file="/etc/jellyfin/system.xml"
@@ -208,6 +220,5 @@ if [ $is_public -eq 1 ]; then
fi
# Reload services
-systemctl enable jellyfin
systemctl start jellyfin
systemctl reload nginx