从局域网中的另一台PC访问Wamp 2.5 phpmyadmin [英] Accessing Wamp 2.5 phpmyadmin from another PC in a LAN Network

查看:123
本文介绍了从局域网中的另一台PC访问Wamp 2.5 phpmyadmin的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以从另一台PC访问wamp localhost,但
从此PC访问phpmyadmin时
我无法像下图一样访问

I have access wamp localhost from another pc but
when accessing phpmyadmin from this pc
i can't access like following figure

推荐答案

在WAMPServer上,已配置phpMyAdmin工具,因此除运行WAMPServer的IP之外,其他任何IP都不能使用它.准确地说,别名已配置为只能从运行Apache的计算机上访问.

On WAMPServer the phpMyAdmin tool is configure so that it cannot be used from any ip other than the one running WAMPServer. Well to be precise the alias is configured so it can only be accessed from the machine running Apache.

这当然是一种安全措施,可以防止初学者意外泄露皇冠上的宝石.

This is of course a security measure, to protect beginners from accidentally giving away the crown jewels.

如果要允许从局域网等其他位置访问phpMyAdmin,则必须修改phpMyAdmin的别名配置.您可以通过修改

If you want to allow access to phpMyAdmin from other locations such as your lan then you have to amend the phpMyAdmin's alias configuration. You do this by editing the

\wamp\alias\phpmyadmin.conf

文件并添加说明以告诉apache,允许它允许更多ip地址连接到该别名.

file and adding instructions to tell apache that it is allowed to let more ip addresses connect to this alias.

Alias /phpmyadmin "d:/wamp/apps/phpmyadmin4.1.14/"

# to give access to phpmyadmin from outside 
# replace the lines
#
# Require local
#
# by
#
# Require all granted
#

<Directory "d:/wamp/apps/phpmyadmin4.1.14/">
   Options Indexes FollowSymLinks MultiViews
   AllowOverride all
  <IfDefine APACHE24>
    Require local
    Require ip 192.168.10                   <-- add this line
  </IfDefine>
  <IfDefine !APACHE24>
    Order Deny,Allow
      Deny from all
      Allow from localhost ::1 127.0.0.1
      Allow from 192.168.10                 <-- add this line
    </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 192.168.2.100 192.168.2.101 192.168.2.102
Require ip 192.168.2.103 192.168.2.104 192.168.2.105

这篇关于从局域网中的另一台PC访问Wamp 2.5 phpmyadmin的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆