Skip to content

Instantly share code, notes, and snippets.

@robdecker
Created January 13, 2020 21:52
Show Gist options
  • Save robdecker/45938631b7e70e867cc9e9fcf5a9e5c0 to your computer and use it in GitHub Desktop.
Save robdecker/45938631b7e70e867cc9e9fcf5a9e5c0 to your computer and use it in GitHub Desktop.
[Access Lando/Drupal site on host from VirtualBox guest] #vm #d8

Lando site info

  • $ lando info
  • Get port of https://localhost:port
  • Get IP of host $ ifconfig
  • Add IP:port to sites.php as $sites['port.ip.ad.dr.ess'] = 'lando-url-alias.org';

Port forwarding

  • Open settings of VM, then Network tab
  • In advanced, open port forwarding
  • Add the port from above in both host port and guest port

Access host site

  • From the VM, use http://ip.ad.dr.ess:port from above

More

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment