检查你的Apache。
编辑htpd.conf文件。在这里有一些语法告诉Apache允许哪些位置(IP地址)接受连接。
由于它的设计是一个开发系统,默认情况下,它只允许运行WAMP(Apache)的PC访问,即本地主机127.0.0.1和可能:: 1,取决于您使用的版本。
所以编辑httpd.conf文件(使用wampmanager菜单)
wampmanager -> Apache -> httpd.conf
查找本节
<Directory "c:/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或者机器的IP的访问你的Apache网络服务器。像这样做
# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 localhost ::1
Allow from 172.20.1.74
# Or you could allow any ip on a subnet by using just the forst 3 quartiles
# Allow from 172.20.1
如果您使用的是Apache 2.4,语法改变了这个如此哟ushould使用
# onlineoffline tag - don't remove
# the equivalent of 127.0.0.1 localhost ::1
Require local
# allowing by IP
Require ip 172.20.1.74
# or for the whole subnet
Require ip 172.20.1
请避免任何建议使用Allow from all
我相信学校不希望你在他们的网络上打开另一个攻击媒介
难道是pi中的端口被另一个服务使用?尝试使用另一个端口号。 –
@fp - 嗨,指定路径时,没有为台式计算机或我的笔记本电脑指定端口号。它被指定为http://172.20.1.74/webS.php – Jethro
听起来像一个权限问题。确保该文件对连接到服务器的用户具有正确的权限。 –