禁用对PHPMyAdmin 4.7.4的远程访问

时间:2018-08-05 12:46:36

标签: phpmyadmin wampserver

我过去曾经允许对PHPMyAdmin的远程访问,现在我正试图禁用它。我编辑了C:\ wamp64 \ alias \ phpmyadmin.conf文件,使其看起来像这样:

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>

但是,它仍然允许远程访问PHPMyAdmin。我应该改变什么?
(我正在使用Windows的WampServer 3.1.0)

1 个答案:

答案 0 :(得分:0)

我通过将C:\ wamp64 \ alias \ phpmyadmin.conf文件更改为:

解决了该问题。
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>