Wildcard subdomain Apache + Vagrant

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:

Next, setup your Vagrantfile to properly set the hostname and the daemon to list on *.{hostname}

Leave a Reply

Your email address will not be published. Required fields are marked *