Search code examples
phpmyadminwampip-addressrestrict

WAMP - How to restrict access to phpMyAdmin for a dedicate ip address?


Maybe duplicate of this or this
but I didnt get my answer there. I want to restrict access to dedicate ip addresses (like 192.168.120.138)

I newly installed wamp server 2.0c (apache 2.2.8 & php 5.2.6 & phpmyadmin 2.11.6)
It keeps on saying

Forbidden
You don't have permission to access /phpmyadmin on this server.

when I try to load "localhost/phpmyadmin"

this is my http.conf

Include "c:/wamp/alias/phpmyadmin.conf"
Include "c:/wamp/alias/*"

and this is my phpmyadmin.conf

<Directory "C:/wamp/apps/phpmyadmin2.11.6">
    AllowOverride all
    Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1 192.168.120.138
</Directory>

But I still see the forbidden msg. Please help me!


Solution

  • You should restart your wamp server, all services for the changes to take effect.

    <Directory "C:/wamp/apps/phpmyadmin2.11.6">
        AllowOverride all
        Order Allow,Deny
        Allow from 127.0.0.1 192.168.120
        Deny from all
    </Directory>