Page 1 of 1

How to change PhpMyAdmin login location?

Posted: Wed Mar 27, 2019 4:37 pm
by rj2010ism
Good day..



Is there a way to change phpmyadmin name and location ?

example: to access phpmyadmin www.domain.tld/ph30221/

and NOT www.domain.tld/phpmyadmin

Cause checking my logs iv noticed some IP trying its luck..

i did find a way to change the path for phpmyadmin by changing alias..

but i want to know how to change it inside the GUI Panel for vestacp ?

is there a guide or something?



Thanks..

Re: How to change PhpMyAdmin login location?

Posted: Wed Mar 27, 2019 8:03 pm
by Alex Connor
Pls, edit

Code: Select all

/etc/nginx/conf.d/phpmyadmin.inc
and

Code: Select all

/etc/httpd/conf.d/phpMyAdmin.conf

Re: How to change PhpMyAdmin login location?

Posted: Sun Mar 31, 2019 8:40 pm
by rj2010ism
Thanks for reply..

I only edited the files:

etc/ httpd/conf.d/phpMyAdmin.conf

Re: How to change PhpMyAdmin login location?

Posted: Sun Mar 31, 2019 8:52 pm
by rj2010ism
This is the steps i created and used to get this to work...

For anybody who may need...

--->im using "phpdemo"<------ as example



====================change phpmyadmin login page===========================
goto: etc/ httpd/conf.d/
change file: phpMyAdmin.conf

edit this two lines:

Alias /phpmyadmin /usr/share/phpmyadmin
Alias /phpMyAdmin /usr/share/phpMyAdmin

change (phpMyadmin to whatever name)

etc:

Alias /phpdemo /usr/share/phpmyadmin
Alias /PhpDemo /usr/share/phpMyAdmin

save file..

now restart services..

Command: service httpd restart
Command: service nginx restart

goto: usr/local/vesta/web/templates



------------------------------------------admin folder---------(for Admin interface)--------------------------------

search these lines in: usr/local/vesta/web/templates/admin/list_db.html

change from:

if ($data[$key]['TYPE'] == 'mysql') $db_admin_link = "http://".$http_host."/phpmyadmin/";

$db_myadmin_link = "http://".$http_host."/phpmyadmin/";


to:

if ($data[$key]['TYPE'] == 'mysql') $db_admin_link = "http://".$http_host."/phpdemo/";


$db_myadmin_link = "http://".$http_host."/phpdemo/";

------------------------------------------user folder---------(for user interface)--------------------------------

search these lines in: usr/local/vesta/web/templates/user/list_db.html


from: if ($data[$key]['TYPE'] == 'mysql') $db_admin_link = "http://".$http_host."/phpmyadmin/";

to: if ($data[$key]['TYPE'] == 'mysql') $db_admin_link = "http://".$http_host."/phpdemo/";

---------------------------------------------------------Database Add config----------------------------------
edit: /usr/local/vesta/web/add/db/index.php


look for line: if ($_POST['v_type'] == 'mysql') $db_admin_link = "http://".$http_host."/phpmyadmin/"

change from: if ($_POST['v_type'] == 'mysql') $db_admin_link = "http://".$http_host."/phpmyadmin/"

to: if ($_POST['v_type'] == 'mysql') $db_admin_link = "http://".$http_host."/phpdemo/"

==================================================================================================