鍍金池/ 問答/PHP  iOS  Linux  數(shù)據(jù)庫/ mac apache2.4.* 配置虛擬主機(jī)Forbidden

mac apache2.4.* 配置虛擬主機(jī)Forbidden

mac 配置虛擬主機(jī)出現(xiàn)如下錯誤:

Forbidden

You don't have permission to access / on this server.
Server unable to read htaccess file, denying access to be safe


apache版本2.4.*
百度了很多答案始終沒有解決

我嘗試修改apache配置文件(httpd.conf)

Require all none -> Require all granted 
AllowOverride none -> AllowOverride all

【失敗】

嘗試添加:

<Directory "project/path">
    Options Indexes FollowSymLinks
    AllowOverride all
    Require all granted
</Directory>

【失敗】

接著我以為是權(quán)限問題,我將目錄權(quán)限修改為777

chomd -R 777 project_directory

【失敗】

我確實(shí)不知道該怎么辦了,依然出現(xiàn)這個問題。

回答
編輯回答
維她命

學(xué)會查看日志,去apache的error log一看便知

2018年2月24日 14:54