I'm setting up a local version of a client site on my laptop using Lando. I've copied the database, files and config and the front page is mostly working - except for the hero image is not loading (all other images are). However, every other page generates a 404 error. 

I feel like I've had this problem before and should know the solution, but if so then I've forgotten it. 

Opening this issue in hopes that I can answer it myself in the next 10 minutes. But if not, I'd appreciate any tips!


So, I think the problem is related to the fact that clean URL's are not working or can not be enabled on this site. 

I realized that this site did not have an .htaccess file because it's usually set up on a NGINX server. So, I added a standard .htaccess file from a new backdrop site, but it's still not working. 

So, now I am trying to figure out why this Lando environment is not supporting clean urls and/or what I can do to fix it.

Next step, I converted my .lando.yml file to use NGINX instead of Apache. 

name: sitename
recipe: backdrop
  webroot: src
  via: nginx

I've verified that the site is using NGINX, but it is still not possible to enable clean urls on this site. 

The documentation here is not very helpful: 

Also confused because Lando should be handling the necessary server config for either Apache or Nginx, so there must be something specific about my site setup that is causing this problem. 

I have created new sites with a fresh new backdrop cms codebase with both the apache and nginx versions of the .lando.yml file and not had any problems with clean urls. 

There is something about this code base that is causing the problem. Next step is permissions.

OK, I started over setting up the site. This time modifying my .lando.yml file to use NGINX from the start and now the site is working. 

My best guess of what was happening is that initially the site was broken because I was using Apache without an .htaccess file. 

Then I played with the permissions before switching to NGINX and by the time I tried NGINX, the problem was my permissions.