好吧,这个问题已经让我发疯了一个星期!我希望我们能一起找到解决办法。
我正在尝试将我的 wamp 服务器配置为在本地网络上运行(可从本地网络访问)。具体来说,我想使用本地连接从另一台计算机访问保存在 /www 文件夹中的项目。我正在为我的 wamp 服务器使用 Windows 7。但是,当我从另一台计算机运行“192.168.178.3:8080”时,出现以下错误:
禁止:您无权访问此服务器上的 /。
我在端口 8080上运行 wamp (IIS 使用端口 80);
我的本地 IP 地址是192.168.178.3
我会试着解释我到目前为止所做的事情......
在 httpd.conf 中更改了以下内容:
Listen 192.168.178.3:8080
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all
</Directory>
<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.4/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.
#
# Online --> Require all granted
# onlineoffline tag - don't remove
Order Deny,Allow
Allow from all
Allow from 127.0.0.1
Require local
</Directory>
<Directory "c:/wamp/www/project">
allow from all
</Directory>
<Directory "cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
另外,我在 http-vhosts.conf 中插入了以下几行:
<VirtualHost 192.168.178:8080>
DocumentRoot "C:/wamp/www/project"
</VirtualHost>
我已重新启动所有内容并将服务器置于联机状态,但仍然出现相同的错误。
任何帮助或建议将不胜感激。
先感谢您!