天天看點

php access forbidden,mac上的xampp出現檔案夾權限Access forbidden! You don’

一個Joomla!程式,之前是在win上的xampp上運作得非常好的,當我把它拿到mac下面的xampp上去運作的時候,發現有問題,沒法運作,報以下的錯誤:

Access forbidden!  You don’t have permission to access the requested object. It is either read-protected or not readable by the server.

這時可以找到apache的httpd.conf檔案(/Applications/XAMPP/xamppfiles/etc/httpd.conf),找出 (此位置隻有一處)

修改成如下:

Options FollowSymLinks

AllowOverride None

Order deny,allow

Allow from all

再次修改 guiboweb 為計算機名稱

User guiboweb

Group staff

如果還是不行,可以

sudo chmod -R 777 /Applications/XAMPP/xamppfiles/htdocs

此路徑為配置好的網站的路徑

即可運作了