如何在LAN中访问wampserver 2.5 localhost

时间:2015-11-28 13:17:33

标签: wamp

我有一台带有wampserver 2.5的Windows 10 PC,我想在手机上访问它。我可以使用我的手机访问192.168.22.3/phpmyadmin但不能访问localhost或任何其他vhost,如192.168.22.3/wordpress。我已经编辑了

#    offlineonline tag - don't remove
Require all granted
Require ip 192.168.22

我在访问192.168.22.3/wordpress时仍然可以在我的手机上获得403 Forbidden

1 个答案:

答案 0 :(得分:0)

如果您的服务器是,例如,192.168.1.254,并且您希望从例如192.168.1.5或公共IP或免费DNS服务等所有地方进行访问,则必须编辑文件 c:\ wamp \别名\ phpmyadmin.conf 并更改

  <IfDefine APACHE24>
    Require local
  </IfDefine>

  <IfDefine APACHE24>
    Require all granted
  </IfDefine>

我的档案:

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

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

<Directory "c:/wamp/apps/phpmyadmin4.1.14/">
   Options Indexes FollowSymLinks MultiViews
    AllowOverride all
  <IfDefine APACHE24>
    Require all granted
  </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>