好好改回來。
此更改允許訪問您安裝的驅動器的根目錄。不是一個好的想法。換個回:
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
,也回
Listen 80
假設你的網站是c:\wamp\www
,如果您的子網實際上是在192.168.50
像你上面的簡單的方法,以允許訪問使用您的網站在本地網絡僅是改變的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 all
#
# 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
</Directory>
和更改部分
# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 ::1 localhost
Allow from 192.168.50
行Allow from 192.168.50
將允許來自任何IP在該子網接入即192.168.50.1的這一部分 - > 192.168.255
如果你把你的網站到子文件夾,然後做到這一點:
<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 all
#
# 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 ::1 localhost
</Directory>
<Directory "c:\wamp\www\sitefolder">
Options Indexes FollowSymLinks
AllowOverride all
Allow from 192.168.50
</Directory>
這將讓你的wampserver網頁安全,但允許訪問該網站sitefolder
給大家的本地網絡。
運行'ipconfig'並查看你的本地IP地址是什麼。 – Blender
這很可能是防火牆/網絡問題。根據您的操作系統,您必須允許來自其他計算機的傳入連接。 – Loopo
所以當你打開你的瀏覽器並輸入你的IP,你會得到一個錯誤?如果是這樣,那麼告訴什麼樣。如果它加載頁面的時間太長,那就是防火牆問題。 – Nazar554