2013-03-17 97 views
1

好吧,所以我一直在嘗試加載這個問題時得到了403錯誤 - 我甚至通過youtube指導安裝了Zend 2,幸運的是它可以用於開箱即用。本地主機與Zend框架上的403錯誤2

我跟着this的建議,但沒有工作,因爲LoadModule rewrite_module modules/mod_rewrite.so沒有被註釋掉我的httpd.conf文件。

我試過this,但是添加Options +Indexes +FollowSymLinks +ExecCGI到我的vhosts.conf文件沒有幫助。

我試着完全刪除.htaccess文件。 我試着評論httpd-xampp.conf文件的「XAMPP安全概念」部分。 我試着問得很好,我試着咒罵它 - 兩種策略都是徒勞的。

我正在運行Windows 8,我似乎無法弄清楚爲什麼我有權限錯誤。爲了清楚起見,我在每次更改後都重新啓動Apache。當我從vhosts.conf文件中刪除條目時,403消失了,但是在那個目錄中導致了404。我已經包含了vhosts.conf文件中的相關代碼。謝謝你的幫助!

NameVirtualHost *:80 

    <VirtualHost *:80> 
     ServerName zf2.localhost 
     DocumentRoot "C:/Users/Captain/Documents/zf2/public" 
     SetEnv APPLICATION_ENV "development" 
     <Directory C:/Users/Captain/Documents/zf2/public> 
     Options +Indexes +FollowSymLinks +ExecCGI 
      DirectoryIndex index.php 
      AllowOverride All 
      Order allow,deny 
      Allow from all 
     </Directory> 
    </VirtualHost> 

再次感謝。

更新1

錯誤日誌:

[Sun Mar 17 03:35:32.627159 2013] [authz_core:error] [pid 5492:tid 1764] [client ::1:50566] AH01630: client denied by server configuration: C:/Users/Captain/Documents/zf2/public/ 
+1

還有一個顯而易見的問題:錯誤日誌說什麼? – CBroe 2013-03-17 07:27:01

+0

@CBroe我已經包含了彈出的行。 – SQLiteNoob 2013-03-17 07:38:27

回答

10

解決它:

裏面的httpd.conf文件,更改

<Directory /> 
     AllowOverride none 
     Require all denied 
    </Directory> 

要:

<Directory /> 
     AllowOverride none 
     Require all granted 
    </Directory> 

這對我很有用,我現在可以訪問localhost和所有目錄項目。

+2

,這並沒有改變我的情況。 – Erik 2014-04-01 22:05:24