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.
This could mean that
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.
If there are no files there, then docker is having trouble mounting your project directory. This has been known to be caused by
ddev stop
projects when I'm not actively working on them. That's completely nondestructive.)On my case, I run ddev config BEFORE doing a composer install, so no files were there. Initially that's not an issue, but it was that I mistakenly accepted the default configs from ddev, which missed that the web root was not the current path, but instead web folder
Another issue could be an error during composer install, where files like index.php were not deployed in the web folder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With