Webmaster Security

How to disable phpmyadmin url?

Submitted by Rape, , Thread ID: 25448

Thread Closed
16-12-2016, 06:30 PM
#1
How do I disable myphpmyadmin access url is open and there are multiple ways to do XSS attacks.

RE: How to disable phpmyadmin url?

#2
In your config.inc.php file change:
Code:
$cfg['Servers'][$i]['auth_type']    = 'config';

and add
Code:
$cfg['Servers'][$i]['user']         = 'root';  
$cfg['Servers'][$i]['password']     = 'password';

or, even better:
locate the file in directory /etc/httpd/conf.d/phpmyadmin.conf/ and uncomment these lines to only give access on the local system to phpmyadmin, and leave the users from outside with no access to phpmyadmin
Code:
<Directory "/usr/share/phpmyadmin">
  Order Deny,Allow
  Deny from all
  Allow from 127.0.0.1
</Directory>
1

RE: How to disable phpmyadmin url?

OP
#3
16-12-2016, 06:33 PM
Monopol Wrote:
In your config.inc.php file change:
Code:
$cfg['Servers'][$i]['auth_type']  = 'config';

and add
Code:
$cfg['Servers'][$i]['user']     = 'root';
$cfg['Servers'][$i]['password']   = 'password';

or, even better:
locate the file in directory /etc/httpd/conf.d/phpmyadmin.conf/ and uncomment these lines to only give access on the local system to phpmyadmin, and leave the users from outside with no access to phpmyadmin
Code:
<Directory "/usr/share/phpmyadmin">
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>

In Cpanel where is myconfig.inc.php file?

RE: How to disable phpmyadmin url?

#4
16-12-2016, 06:54 PM
Rape Wrote:
In Cpanel where is myconfig.inc.php file?

/usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php

Please take backup before you change anything, i haven't worked with cpanel even once.

RE: How to disable phpmyadmin url?

#5
Moved to Webmaster Security.
Next time pick the right section. '-'

RE: How to disable phpmyadmin url?

#6
Nice, been looking into this, hope it will work!

Users browsing this thread: 2 Guest(s)