好好改回来。
此更改允许访问您安装的驱动器的根目录。不是一个好的想法。换个回:
<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