Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to restrict access to phpmyadmin? [duplicate]

Possible Duplicate:
How to secure phpMyAdmin

I use phpmyadmin to preview the database of my website. However, everyone can access the login page of my phpmyadmin by simply typing example.com/phpmyadmin

I am not an expert in network security but I assume this isn't very secure.

How can I restrict the access to the login page(maybe creating some alias like example.com/a4ebb72d ). I heard about allowing access only for specified IPs, but it won't help because I have dynamically assigned IP.

I'd be thankful for your tips.

like image 755
nan Avatar asked Sep 10 '10 20:09

nan


1 Answers

Exposing any part of phpMyAdmin is a potential risk. You could use Apache's Allow/Deny directives:

Order Deny,Allow
Deny from All
Allow from 12.34.56.78

Replace 12.34.56.78 with your IP address, and put this in a .htaccess file in your phpMyAdmin folder.

like image 102
Lekensteyn Avatar answered Oct 22 '22 00:10

Lekensteyn