Laravel Homestead:Nginx禁止使用403 [英] Laravel Homestead: 403 forbidden on nginx

查看:214
本文介绍了Laravel Homestead:Nginx禁止使用403的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是按照他们的说明安装了Laravel Homestead.当我打开 http://homestead.app:8000 时,我得到了nginx 403禁止的HTTP响应.

I just installed Laravel Homestead according to their instructions. When I open http://homestead.app:8000 I get the nginx 403 forbidden HTTP Response.

我尝试将应用程序/存储权限设置为755,但这没有用,所以我重新加载了Vagrant.没有进一步的结果.

I have tried setting app/storage permissions to 755, but that didn't work, so I reloaded Vagrant. With no further result.

我也尝试更改nginx配置,但没有成功.

I also tried changing the nginx configuration, but with no success.

推荐答案

我遇到了同样的问题,对我来说,原因是在Homestead.yaml文件中,我没有正确地输入以下内容:

I had the same problem and for me the cause was that in the Homestead.yaml file, I have incorrectly put this:

sites:
- map: homestead.app
  to: /home/vagrant/Code

代替正确的语法:

sites:
- map: homestead.app
  to: /home/vagrant/Code/path/to/public

这篇关于Laravel Homestead:Nginx禁止使用403的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆