允许IP访问phpmyadmin

时间:2017-04-19 14:49:32

标签: phpmyadmin localhost wamp config

我在计算机上安装了wamp并将其用作本地服务器

我想允许访问phpmyadmin到ip(除了本地)以便从我的PC访问数据库

所以我打开了phpmyadmin.conf文件(c:/wamp/alias/phpmyadmin.conf

看起来像这样:

<Directory "c:/wamp/apps/phpmyadmin4.1.14/">
   Options Indexes FollowSymLinks MultiViews
   AllowOverride all
  <IfDefine APACHE24>
    Require local
  </IfDefine>
  <IfDefine !APACHE24>
    Order Deny,Allow
      Deny from all
      Allow from localhost ::1 127.0.0.1
    </IfDefine>
  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>

我在Require ip 10.25.xx.xx

行之后添加Require local

我重新启动了wamp但它不起作用..我添加并删除了其他行没有成功

我该怎么办?谢谢

编辑:看起来像这样:

<Directory "c:/wamp/apps/phpmyadmin4.1.14/">
       Options Indexes FollowSymLinks MultiViews
       AllowOverride all
      <IfDefine APACHE24>
        Require local
        Require ip 10.25.269.56
      </IfDefine>
      <IfDefine !APACHE24>
        Order Deny,Allow
          Deny from all
          Allow from localhost ::1 127.0.0.1
        </IfDefine>
      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>

0 个答案:

没有答案