Ever needed to setup a local SaaS app development server? Is your
/etc/hosts file a mess? Me too!
Landrush to the rescue! Previously you’d setup dnsmasq locally to handle this on your physical machine, but if you’re in Vagrant you need to point to the IP of the virtual machine via Vagrant so it gets messy. Landrush is a magical piece of software that handles setting up a daemon in your Vagrant machine that solves this across the board.
Simply install the vagrant plugin locally:
vagrant plugin install landrush
Next, setup your
Vagrantfile to properly set the hostname and the daemon to list on
# -*- mode: ruby -*-
# vi: set ft=ruby :
ip_address = "192.168.0.50"
app_name = "myapp"
hostname = app_name + '.dev'
Vagrant.configure(2) do |config|
# Landrush: https://github.com/phinze/landrush
config.landrush.enabled = true
config.landrush.tld = 'dev'
config.landrush.host hostname, ip_address