How to block PhpMyAdmin from public access?

ErikR

Verified User
Joined
Aug 18, 2005
Messages
20
Hi,
PhpMyAdmin is public reachable by default in DirectAdmin. In my opinion this is a potential risk. How can I give access to only some ip addresses? If I google I read you can do it with .htaccess, but than I have to add it to the .htaccess files of all the domains on the server? That can not be the intention...
 
Well, already found a solution: added a .htaccess file to /var/www/html/phpMyAdmin which contains:

Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from xxx.xxx.xxx.xxx
 
Back
Top