檢查你的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
聽起來像一個權限問題。確保該文件對連接到服務器的用戶具有正確的權限。 –