Page 1 of 1

Changed PHPMyadmin URL - No Icons

Posted: Wed Apr 01, 2020 2:50 pm
by LoGiCa7
Hi,

I am trying to change the default PHPMyadmin url.

I have my server setup with Nginx & PHP-FPM.

I edited /etc/nginx/conf.d/phpmyadmin.inc as below. The new URL works but there are no icons...

Code: Select all

location /dbadmin {
    alias /usr/share/phpmyadmin/;

    location ~ /(libraries|setup) {
        return 404;
    }

    location ~ ^/dbadmin/(.*\.php)$ {
        alias /usr/share/phpmyadmin/$1;
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $request_filename;
    }
    location ~* ^/dbadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
        root /usr/share/;
    }
}
Image

What am I doing wrong?

Thanks!

Re: Changed PHPMyadmin URL - No Icons

Posted: Wed Apr 01, 2020 6:28 pm
by grayfolk
May be

Code: Select all

location ~* ^/dbadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
        root /usr/share/phpmyadmin;
    }

Re: Changed PHPMyadmin URL - No Icons

Posted: Thu Apr 02, 2020 6:21 pm
by LoGiCa7
Thanks for the suggestion. Unfortunately that didn't fix the issue.

Image

Re: Changed PHPMyadmin URL - No Icons

Posted: Thu Apr 02, 2020 10:02 pm
by grayfolk
I see this in my original configuration:

Code: Select all

location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
        alias /usr/share/phpMyAdmin/$1;
    }

Re: Changed PHPMyadmin URL - No Icons

Posted: Sat Apr 04, 2020 3:58 pm
by LoGiCa7
grayfolk wrote:
Thu Apr 02, 2020 10:02 pm
I see this in my original configuration:

Code: Select all

location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
        alias /usr/share/phpMyAdmin/$1;
    }
Not working either :(

Has anyone else managed to change the default PHPMyadmin URL when running NGINX + PHP-FPM?

Re: Changed PHPMyadmin URL - No Icons

Posted: Sat Apr 04, 2020 4:25 pm
by grayfolk
Dont see any problem: https://c2n.me/46PWzaC
I just edit 3 lines in /etc/nginx/conf.d/phpmyadmin.inc: https://c2n.me/46PWBdA
Then restart nginx, nothing else.

Re: Changed PHPMyadmin URL - No Icons

Posted: Mon Apr 06, 2020 9:25 pm
by LoGiCa7
grayfolk wrote:
Sat Apr 04, 2020 4:25 pm
Dont see any problem: https://c2n.me/46PWzaC
I just edit 3 lines in /etc/nginx/conf.d/phpmyadmin.inc: https://c2n.me/46PWBdA
Then restart nginx, nothing else.
Thanks for your help. It is now working :)

Re: Changed PHPMyadmin URL - No Icons

Posted: Sat Feb 06, 2021 11:51 am
by Slavaws
Hello.
I need help with PhpMyAdmin on VestaCP.
Styles don't work in all browsers.
I attach a screenshot.

Image

Unfortunately, the link by grayfolk https://c2n.me/46PWBdA does not work (error 404).
Thanks!

Re: Changed PHPMyadmin URL - No Icons

Posted: Mon Jul 04, 2022 10:48 am
by v1ny4
this is for nginx

new phpmyadmin link inside panel works & images load fine

I changed phpmyadmin to phpmyadmin24879 at 3 places ...

root@ifght678:~# nano /etc/nginx/conf.d/phpmyadmin.inc

Code: Select all


location /phpmyadmin24879 {
    alias /usr/share/phpmyadmin;

    location ~ /(libraries|setup) {
        return 404;
    }

    location ~ ^/phpmyadmin24879/(.*\.php)$ {
        alias /usr/share/phpmyadmin/$1;
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $request_filename;
    }
    location ~* ^/phpmyadmin24879/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
        alias /usr/share/phpmyadmin/$1;

    }
}
in vestapanel ---
server >> configure >> db >> phpMyAdmin URL

https://mysite.com/phpmyadmin24879

hope this works for you!