Mac上安裝xampp,無法獲取到htdocs目錄下的某些項目文件夾。
01-29
Mac上安裝xampp,無法獲取到htdocs目錄下的某些項目文件夾。
Access forbidden!
You dont have permission to access the requested object. It is either read-protected or not readable by the server.
If you think this is a server error, please contact the webmaster.
Error 403
localhost
Apache/2.4.25 (Unix) OpenSSL/1.0.2j PHP/5.6.30 mod_perl/2.0.8-dev Perl/v5.16.3這是因為,Mac中有些文件夾是只對本機用戶有讀寫許可權,如果是伺服器去訪問這些文件夾,則會報forbid。
解決辦法:
打開 Applications/XAMPP/xamppfiles/etc/httpd.conf,
搜索User/Group,
修改下面的User和Group, User修改為mac的用戶名, Group修改為staff
這樣,就解決了問題~
推薦閱讀:
※成為碼魔的三條路
※C、C++語言學習資料
※好書一起讀(186):編程的一點心得
※計算機語言恐懼症怎麼辦? 或者說,一學習就困的病怎麼治?
※做計算幾何有前途嗎?