Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 comment

1 Answer

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

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

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

share|improve this answer
1  
Some more config info here httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow –  LukeR Jul 1 '11 at 10:59
add comment

Your Answer

 
discard

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.