![](/img/trans.png)
[英]I deployed my Laravel project into Heroku but git this 403 error “Forbidden You don't have permission to access this resource.”
[英]Laravel getting 403 Forbidden error “You don't have permission to access this resource.”
我正在 MAMP 环境中从事 Laravel 项目。
基本上,如果我在
/User/my-user/Desktop/myLaravelProj
当我访问 http://localhost 时,浏览器显示 403 Forbidden 错误“您无权访问此资源。”
如果我将 Laravel 项目移动到
/Users/my-user/.composer/vendor/laravel/installer/myLaravelProj or /Library/WebServer/Documents/myLaravelProj
它工作正常。
当我移动我的项目文件夹时,我已将/etc/apache2/httpd.conf
的DocumentRoot
和<Directory>
更改为corresponding-directory/myLaravelProj/public
。 我还通过以下方式授予了目录存储和引导程序/缓存的权限
sudo chmod -R 775 storage/ bootstrap/cache/
sudo chown -R my-user:www storage/ bootstrap/cache/
我喜欢在桌面上有我的 Laravel 项目以便更快地访问。 我错过了什么吗?
在/etc/apache2/httpd.conf
添加这个
<Directory "/desktopFolderPath"> // here your dir path
AllowOverride All
Require all granted
</Directory>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.