2013-02-25 82 views
2

最近從Win XP(x86)移到Win 7(x64),我也必須重新安裝Apache。我已經安裝了Apache(2.4.3)和PHP(2.4)的64位版本。將Apache鎖定到localhost

我將它安裝到c:\ Apache24。

我已經完成並運行,但現在我需要將其鎖定到我的本地PC上。

如果我有:

<Directory "c:/Apache24/htdocs"> 
Options Indexes FollowSymLinks 

AllowOverride None 

Order allow,deny 
Allow from all 
# New directive needed in Apache 2.4.3 apparently: 
Require all granted 
</Directory> 

這工作正常,但如果我把它改爲:

<Directory "c:/Apache24/htdocs"> 
Options Indexes FollowSymLinks 

AllowOverride None 

Order allow,deny 
Allow from 127.0.0.1 
# New directive needed in Apache 2.4.3 apparently: 
Require all granted 
</Directory> 

(或 '從本地主機允許' 或 '從192.xyz允許')

我得到一個訪問被拒絕的錯誤。我怎樣才能解決這個問題?

所有安裝使用我的登錄,它具有完整的本地管理員權限。

回答

0

非常簡單的方法從here

Listen 172.0.0.1:80 

雷默mber刪除其他Listen指令,如果有其他的話。