Deny access to phpmyadmin on the Web

Posted on October 9, 2009 | Category: Apache, Browsers, Informational, Linux, Scripts, Security, Server


I have operated a web server for the last 3 or 4 years. But, only recently have people been attempting to access my phpmyadmin subdirectory. This post will provide a quick method of disallowing access to your phpmyadmin directory based on ip addresses.

Using terminal, navigate to your /etc/apache2/conf.d directory. Next, edit your phpmyadmin.conf file and place the following code directly after “<Directory /usr/share/phpmyadmin>.”

order deny,allow deny from all allow from ip-address

Substitute ‘ip-address’ for your internal or external ip. If you want to allow more than one ip, whether internal or external, just add more ‘allow from’ lines.

Another method that I read about involved using php within your index.php of phpmyadmin. Read about that here.

Similar Articles

Leave a Reply

CAPTCHA Image CAPTCHA Audio
Refresh Image

Design: YGoY TopOfBlogs