Search code examples
phpmyadminwampserver

Disabling remote access to PHPMyAdmin 4.7.4


I allowed remote access to PHPMyAdmin in the past and now I'm attempting to disable it. I've edited the C:\wamp64\alias\phpmyadmin.conf file to look like this:

Alias /phpmyadmin "c:/wamp64/apps/phpmyadmin4.7.4/"

<Directory "c:/wamp64/apps/phpmyadmin4.7.4/">
    Options +Indexes +FollowSymLinks +MultiViews
    AllowOverride all

    <ifDefine APACHE24>

    </ifDefine>

    <ifDefine !APACHE24>
        Order Deny,Allow
    Deny from all
    Allow from localhost
    </ifDefine>

    # To import big file you can increase values
    php_admin_value upload_max_filesize 128M
    php_admin_value post_max_size 128M
    php_admin_value max_execution_time 360
    php_admin_value max_input_time 360
</Directory>

However it still allows remote access to PHPMyAdmin. What should I change?
(I'm using WampServer 3.1.0 for Windows)


Solution

  • I solved the issue by changing the C:\wamp64\alias\phpmyadmin.conf file to:

    Alias /phpmyadmin "c:/wamp64/apps/phpmyadmin4.7.4/"
    
    <Directory "c:/wamp64/apps/phpmyadmin4.7.4/">
        Options +Indexes +FollowSymLinks +MultiViews
        AllowOverride all
    
        <ifDefine APACHE24>
        Require local
        </ifDefine>
    
        <ifDefine !APACHE24>
            Order Deny,Allow
        Deny from all
        Allow from localhost
        </ifDefine>
    
        # To import big file you can increase values
        php_admin_value upload_max_filesize 128M
        php_admin_value post_max_size 128M
        php_admin_value max_execution_time 360
        php_admin_value max_input_time 360
    </Directory>