2013-03-14 73 views
1

好吧,現在這個問題一直讓我瘋狂!我希望我們能夠一起找到解決方案。從本地網絡訪問wamp時出現禁止錯誤

我想配置我的wamp服務器到在本地網絡上運行(可從本地網絡訪問)。具體來說,我想使用本地連接從另一臺計算機訪問保存在/ www文件夾中的項目。我正在使用Windows 7作爲我的wamp服務器。然而,當我運行「192.168.178.3:8080」從另一臺電腦我得到以下錯誤:

Forbidden: You don't have permissions to access/on this server.

我上端口上運行WAMP 8080(80端口是由IIS使用);
我的本地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> 

我已經重新啓動everythi ng並把服務器在線但仍然得到相同的錯誤。

任何幫助或建議,將不勝感激。

預先感謝您!

回答

3

我真的設法解決了我的問題。

端口8080似乎是造成問題(奇怪的權利)。所以我重新安裝WAMP只有(使用端口8070)做了如下改變在httpd.conf:

Listen 192.168.178.3:8070 

<Directory "cgi-bin"> 
    AllowOverride None 
    Options None 
    Order allow,deny 
    Allow from all 
</Directory> 

此外,我不得不添加卡巴斯基防火牆此端口的異常,以及配置路由器轉發端口。 解決了它。