Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I limit the access to phpMyAdmin from only specific IP addresses ? I want phpMyAdmin, which is hosted on a data center to be accessible only from the IP range in my office. LAMP and phpMyAdmin is running on a Debian 6 linux server.

share|improve this question

Add/Edit the following in your vhost configuration or in the corresponding .htaccess file:

<Location /path/to/phpmyadmin>
   Order allow,deny
   Allow from
   Allow from
   Deny from all

Replace the Path to the folder and the IP's as you need it.

share|improve this answer
Some more config info here – LukeR Jul 1 '11 at 10:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.