好了,这个问题让我疯狂了一个星期!我希望我们能一起找到解决方案。
我正在尝试将我的wamp服务器配置为在本地网络上运行(可从本地网络访问)。具体来说,我想使用本地连接从另一台计算机访问保存在/ www文件夹中的项目。我正在使用Windows 7作为我的wamp服务器。但是,当我从另一台计算机运行“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>
我已重新启动所有内容并将服务器联机但仍会出现相同的错误。
任何帮助或建议都将不胜感激。
提前谢谢!
答案 0 :(得分:3)
我实际上设法解决了我的问题。
端口8080似乎造成了问题(怪异的权利)。所以我重新安装了wamp,只在httpd.conf中进行了以下更改(使用端口8070):
Listen 192.168.178.3:8070
<Directory "cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
另外,我不得不在卡巴斯基防火墙中添加此端口的例外,以及配置路由器以转发端口。 这解决了它。