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
Another method that I read about involved using php within your index.php of phpmyadmin. Read about that here.