lando/lagoon

Unable to add route via proxy when using Lagoon integration

Opened this issue · 5 comments

When using the Lando Lagoon integration, we should be able to add a custom route (either lndo.site or custom DNS) as per https://docs.lando.dev/guides/lando-101/lando-proxy.html

However, when trying this, even with a vanilla project (such as https://github.com/amazeeio/drupal-example-simple) the custom routes defined in the .lando.yml are not usable - but the default routes (eg mailhog) are.

name: drupal8-example-simple
recipe: lagoon
config:
  flavor: drupal
  build:
    - composer install
proxy:
  nginx:
    - abcde.lndo.site

image

I have tested alongside this with a default (non-lagoon) Lando project and it all works as expected as per documentation.

pirog commented

@tobybellwood thanks for the report. Let me see if i can replicate.

pirog commented

Running against latest Lando 3.0.26, steps to replicate:

  1. git clone --branch 8.x https://github.com/amazeeio/drupal-example-simple.git amazee-d8-example

  2. cd amazee-d8-example

  3. lando start

  4. Above seems to work as expected. Now, replace the .lando.yml with:

name: drupal8-example-simple
recipe: lagoon
config:
  flavor: drupal
  build:
    - composer install
proxy:
  nginx:
    - abcde.lndo.site
  1. lando rebuild

Screen Shot 2021-03-02 at 8 26 04 AM

A key difference for me here is that i am getting a 502 Bad Gateway and not a 404 which is what @tobybellwood said he had.

pirog commented

@tobybellwood, try this

name: drupal8-example-simple
recipe: lagoon
config:
  flavor: drupal
  build:
    - composer install
proxy:
  nginx:
    - abcde.lndo.site:8080

The lagoon nginx service runs on port 8080 by default so you need the extra :8080. If you omit it defaults to :80 which is what the lando nginx service uses. We might just want to document this somewhere.

ah, perfect - can confirm that works correctly. I'll throw a PR into the docs to help people out.

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions and please check out this if you are wondering why we auto close issues.