felixarntz / wordpressdev

WordPress core development environment based on Lando.
GNU General Public License v2.0
13 stars 0 forks source link

Address loopback request problem #3

Closed westonruter closed 5 years ago

westonruter commented 5 years ago

We need to add the lndo.site URL to the hosts file in the containers to fix loopback requests, apparently. Perhaps here:

https://github.com/felixarntz/wordpressdev/blob/b6a746c7a9bbcacbfff627bff6f592aca6d3e88e/.lando.yml#L16-L21

westonruter commented 5 years ago

@ataylorme Are you aware if something like this will work:

services:
  appserver:
    install_dependencies_as_root:
      # Allow loopback requests to work.
      - echo "127.0.0.1  wordpressdev.lando.site" >> /etc/hosts

Have you also encountered the loopback request problem?

westonruter commented 5 years ago

Just saw this on the docs:

image

I can confirm this works:

services:
  appserver:
    run_as_root:
      # Allow loopback requests to work.
      - echo "127.0.0.1  wordpressdev.lando.site" >> /etc/hosts

Loopback requests work successfully with that change.

felixarntz commented 5 years ago

@westonruter Double-checking, this is fixed right?

Not a perfect fix probably (in case you'd wanna use a different host or support multiple hosts), but I think good for now.

westonruter commented 5 years ago

Yeah, it's been working for me.