ddev launch command returns "File not found."

607 Views Asked by At

My organization is establishing a ddev-pantheon setup on Windows 10. Successful "ddev pull pantheon" commands have executed. 403 errors arose after running ddev start and clicking the project links; this error disappeared after establishing the folder with "index.php" as the docroot folder in my "config.yaml" file. However, now "File not found." is being displayed after clicking both project links (those returned after a "ddev start" or "ddev restart" command). Could it be that some file in the repo linked to the index.php file is having trouble locating another file - how do I get rid of this message and view the site?

If anyone is willing to help me establish a functional connection, then I would appreciate it. It will also be helpful to know where ddev users usually clone their git repositories and how I can locate the files downloaded following a "ddev pull pantheon" command. Could the presence of lando .yml files cause issues? Any help is appreciated. Thank you.

Moving the "index.php" file (and those referenced by it) into the initial docroot folder did not get rid of the "File not found." message. Neither did deleting the repo, redownloading it, and establishing the new repo folder as the docroot folder in the "config.yaml" file resolve this issue.

1

There are 1 best solutions below

0
On

As you discovered, the most common reason to get a 403 is that your docroot is set wrong (or that there is no index.php or index.html in your docroot). This happens enough that there's an FAQ for it, https://ddev.readthedocs.io/en/latest/users/basics/faq/#why-do-i-get-a-403-or-404-on-my-project-after-ddev-launch

Please look at your .ddev/config.yaml and see what's there for docroot when you're having this problem, and use ddev ssh to inspect what's inside the container.

ddev logs may help you understand why the 403 is happening.

You don't say whether you're using mutagen or not.

ddev pull pantheon should have nothing to do with your 403 problem; it's not clear why you mention ddev pull pantheon. I supposed you could have a really messed up pantheon.yaml that could do it, or that you could be downloading a broken database. Are you saying that your project is only broken after you do a pull? If so, ddev delete -Oy will get you back to where you started, so you can demonstrate that. You can also do ddev pull pantheon --skip-files or ddev pull pantheon --skip-db as part of your debugging process.

The way things should be working:

  • You should have checked out your git repo that has the code for your project.
  • On most project types you would have done a ddev composer install after that.
  • Then a ddev pull pantheon would load your database with the upstream database. You can see the contents of the database with ddev mysql or by using the PhpMyAdmin UI (ddev launch -p).
  • The files from Pantheon will be put into your upload_dir. For example, this would be web/sites/default/files on a standard Drupal project.

BTW, the recommended environment on Windows is WSL2, you'll like it a lot in the long run.

This sort of problem would be easier to sort out in a more interactive environment, so you're invited to the DDEV Discord at https://discord.gg/hCZFfAMc5k .