Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Database Server
  • Search

How to change PhpMyAdmin login location?

Questions regarding the Database Server
MySQL, PostgreSQL, MariaDB, Percona Server, phpMyAdmin, phpPgAdmin
Post Reply
  • Print view
Advanced search
4 posts • Page 1 of 1
rj2010ism
Posts: 30
Joined: Thu Jan 03, 2019 11:04 am

Os: CentOS 5x
Web: apache + nginx
How to change PhpMyAdmin login location?
  • Quote

Post by rj2010ism » Wed Mar 27, 2019 4:37 pm

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..
Top

Alex Connor
Support team
Posts: 1047
Joined: Fri Mar 21, 2014 7:49 am
Contact:
Contact Alex Connor
Website Twitter

Os: CentOS 6x
Web: apache + nginx
Re: How to change PhpMyAdmin login location?
  • Quote

Post by Alex Connor » Wed Mar 27, 2019 8:03 pm

Pls, edit

Code: Select all

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

Code: Select all

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

rj2010ism
Posts: 30
Joined: Thu Jan 03, 2019 11:04 am

Os: CentOS 5x
Web: apache + nginx
Re: How to change PhpMyAdmin login location?
  • Quote

Post by rj2010ism » Sun Mar 31, 2019 8:40 pm

Thanks for reply..

I only edited the files:

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

rj2010ism
Posts: 30
Joined: Thu Jan 03, 2019 11:04 am

Os: CentOS 5x
Web: apache + nginx
Re: How to change PhpMyAdmin login location?
  • Quote

Post by rj2010ism » Sun Mar 31, 2019 8:52 pm

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/"

==================================================================================================
Top


Post Reply
  • Print view

4 posts • Page 1 of 1

Return to “Database Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password