Lando: Laravel recipe with multiple custom domains

Created on 18 Feb 2019  路  3Comments  路  Source: lando/lando

Just upgraded Lando to v3.0.0-rc.10.

I have a multi-domain Laravel project. E.g. the application is reachable via http://site.test and http://anothersite.test (of course these domains appears in /etc/hosts)

According to https://docs.devwithlando.io/guides/updating-to-rc2.html#new-images I've updated my .lando.yml to

name: laravel
recipe: laravel
proxy:
  myservice_nginx:
    - site.test
    - anothersite.test
config:
  webroot: public
services:
  myservice:
    type: php
    via: nginx

After lando start I got (every URL is green)

 NAME                  laravel
 LOCATION              /Users/<omitted>/laravel
 SERVICES              appserver, database, myservice_nginx, myservice
 APPSERVER URLS        https://localhost:32899
                       http://localhost:32900
                       http://laravel.lndo.site
                       https://laravel.lndo.site
 MYSERVICE_NGINX URLS  http://localhost:32898
                       http://site.test
                       https://site.test
                       http://anothersite.test
                       https://anothersite.test

...but browsing for example http://site.test results in a 403 - Forbidden reply by Nginx.

What am I missing?

Any help would be very appreciated. Thanks

Most helpful comment

@eleftrik i think you might be taking the update docs too literally. What is the purpose of the second php service?

I'm _guessing_ what you want to accomplish is possible with something like

name: laravel
recipe: laravel
proxy:
  appserver_nginx:
    - site.test
    - anothersite.test
config:
  webroot: public
  via: nginx

All 3 comments

@eleftrik i think you might be taking the update docs too literally. What is the purpose of the second php service?

I'm _guessing_ what you want to accomplish is possible with something like

name: laravel
recipe: laravel
proxy:
  appserver_nginx:
    - site.test
    - anothersite.test
config:
  webroot: public
  via: nginx

Thank you @pirog, yesterday I finally managed how to do.
I'm pretty sure I already tried a solution like yours, but during all my tests maybe I forgot to launch some command and I got confused.
Thanks for your kind support!

@pirog

name: drupal7
recipe: drupal7
proxy:
  appserver_nginx:
    - site.test
    - anothersite.test
config:
  webroot: .
  via: nginx
  php: '5.6'

that s not working in lando version v3.0.0-rc.12

Was this page helpful?
0 / 5 - 0 ratings