【发布时间】:2014-02-27 12:15:03
【问题描述】:
有人知道如何在 iPad 或 iPhone 上查看 Wamp 上的本地托管网站吗?我设法打开命令提示符并找到我的 IP 地址 192.168.1.18。然后我在 iPad 上的浏览器中输入了这个地址,但出现“禁止”错误。
我怎样才能让它工作?
【问题讨论】:
标签: wordpress ipad wamp ip-address wampserver
有人知道如何在 iPad 或 iPhone 上查看 Wamp 上的本地托管网站吗?我设法打开命令提示符并找到我的 IP 地址 192.168.1.18。然后我在 iPad 上的浏览器中输入了这个地址,但出现“禁止”错误。
我怎样才能让它工作?
【问题讨论】:
标签: wordpress ipad wamp ip-address wampserver
试试这个
编辑您的 httpd.conf 文件,然后查找此部分
<Directory "d:/wamp/www/">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 localhost
</Directory>
现在将其更改为允许从您的 ip 访问
# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 localhost
Allow from 192.168.1
注意,我只使用了 IP 地址的 4 个部分中的前 3 个,这将允许从 192.168.1.0 到 192.168.1.255 范围内的任何 IP 地址进行访问。这是因为您的 ipad 将获得不同的 IP 地址分配给它,具体取决于您在任何时候可能连接了多少其他设备。
如果您使用的是 WAMPServr 2.4,因此使用的是 Apache 2.4.x,语法略有不同,您应该使用我们
Require local
Require ip 192.168.1
Require local 涵盖 127.0.0.1 localhost 以及 IPV6 localhost 等效项 ::1。
【讨论】: