Browse Source

Update phpmyadmin.inc (#4618)

* Update phpmyadmin.inc

regex correction.

* Update phpmyadmin.inc in /etc/ninx/conf.d folder

---------

Co-authored-by: Jaap Marcus <9754650+jaapmarcus@users.noreply.github.com>
Alber Khan 1 year ago
parent
commit
2a102e5e8a
2 changed files with 7 additions and 2 deletions
  1. 2 2
      install/deb/nginx/phpmyadmin.inc
  2. 5 0
      install/upgrade/versions/1.9.0.sh

+ 2 - 2
install/deb/nginx/phpmyadmin.inc

@@ -21,7 +21,7 @@ location /%pma_alias% {
 	}
 
 	# Serve static files like CSS and JS
-	location /%pma_alias%/(.+\.(jpg|jpeg|gif|css|png|webp|js|ico|html|xml|txt))$ {
-		alias /usr/share/phpmyadmin/;
+	location ~ ^/%pma_alias%/(.*\.(jpg|jpeg|gif|css|png|webp|js|ico|html|xml|txt))$ {
+		alias /usr/share/phpmyadmin/$1; # Corrected from root to alias
 	}
 }

+ 5 - 0
install/upgrade/versions/1.9.0.sh

@@ -95,6 +95,11 @@ if [ -s /etc/exim4/exim4.conf.template ] && ! grep -Fq "smtp_accept_max" /etc/ex
 	sed -i '/disable_ipv6 = true/a\smtp_accept_max = 100\nsmtp_accept_max_per_host = 20' /etc/exim4/exim4.conf.template
 fi
 
+# Update phymyadmin.inc for nginx
+if [ -s /etc/nginx/conf.d/phpmyadmin.inc ]; then
+	cp -f $HESTIA_INSTALL_DIR/install/deb/nginx/phpmyadmin.inc /etc/nginx/conf.d/phpmyadmin.inc
+fi
+
 $BIN/v-add-user-notification 'admin' 'Hestia security has been upgraded' ' A new user "hestiaweb" has been created and is used for login. Make sure other Hestia packages are updated as well otherwise the system may not work as expected.'
 add_upgrade_message 'Security has been upgraded, A new user "hestiaweb" has been created and is used for login. Make sure other Hestia packages are updated as well otherwise the system may not work as expected.'
 # Ensures proper permissions for Hestia service interactions.