changing the document root to your ‘Sites’ folder
- install xampp from apachefriends.org
- open /Applications/XAMPP/xampfiles/etc/ in finder; right click > get info
make sure its read / write by everyone - open /Applications/XAMPP/xampfiles/etc/httpd.conf
- scroll down to ‘DocumentRoot’
- type in the location of your ‘sites’ folder [ /Users/username/Sites ]
- scroll down to the <Directory> config
- replace /Applications/XAMPP/xamppfiles/htdocs with /Users/username/Sites
- save
- restart apache
- goto http://localhost to see what you have
Then gives this error:
“Access forbidden!
You don’t have permission to access the requested directory. There is either no index document or the directory is read-protected.
If you think this is a server error, please contact the webmaster. …”
To solve this:
sudo chmod 777 /Users/username/Sites
本文指导您如何解决在配置XAMPP时遇到的'Access forbidden!'错误,通过更改文档根目录并赋予适当权限,确保您的站点正常运行。
895

被折叠的 条评论
为什么被折叠?



