启动ddev时出现“ ngnix 403 Forbidden” [英] I get an `ngnix 403 Forbidden' when starting ddev

查看:140
本文介绍了启动ddev时出现“ ngnix 403 Forbidden”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

启动我的ddev项目并使用网络浏览器将其击中之后,我突然开始收到禁止ngnix 403禁止访问/目录索引 // var / www / html /,或者只是 403禁止访问,我可以。找出原因。

After starting my ddev project and hitting it with the web browser I suddenly started getting `ngnix 403 Forbidden / directory index of "/var/www/html/" is forbidden' or just '403 Forbidden', and I can't figure out why. This worked earlier.

推荐答案

这可能意味着


  • 您的项目目录未安装

  • 或项目目录已安装,但是docroot中没有index.php或index.html(或者docroot配置错误,因此对于nginx和ddev来说似乎没有可用的索引)

要了解是否已安装项目目录,请使用 ddev ssh 进入Web容器,并使用 ls 来查看您看到的内容是否应该在文档根目录中看到。

To find out if the project directory is mounted, use ddev ssh to go inside the web container, and use ls to see if the contents you see are what you should see in the docroot.

如果那里没有文件,则说明docker无法挂载您的项目目录。众所周知,这是由于

If there are no files there, then docker is having trouble mounting your project directory. This has been known to be caused by


  • Docker资源紧张所致。您可以将docker的内存分配从默认的2GB增加,或一次运行较少的项目。 (通常,当我不积极参与项目时,通常是 ddev rm 个项目。这完全是无损的。)

  • 此问题,它被发现是卡巴斯基的防火墙问题。

  • Docker resources being stressed. You can increase docker's memory allotment from the default 2GB, or run less projects at once. (I generally ddev rm projects when I'm not actively working on them. That's completely nondestructive.)
  • In this issue it was found to be a firewall issue with Kaspersky.

这篇关于启动ddev时出现“ ngnix 403 Forbidden”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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