Deny access to phpmyadmin on the Web

published October 9th, 2009 | categories: Apache, Browsers, Informational, Linux, Scripts, Security, Server | all categories

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.

Related Posts

Previous Post: «
Next Post: »
Do you have something to say? Send me a message on Twitter @nwlinux.

Recent Posts

Adding a LCD monitor to the air monitoring data logger cube
categories include: Hardware

Office Prank: too many sticky notes
categories include: Images

Zero and Span using Advantech Device Manager
categories include: Hardware


About >> I'm a Network Administrator out of Olympia, WA.

Social >> You can find me on Twitter @nwlinux or LinkedIn.

RSS Feed >> You can hit up FeedBurner.