Well, this isn’t actually automatic mapping, but I’m pretty sure that if you googled for it, this tutorial is what you’re looking for.

I work on multiple sites at a single day, and I have to navigate, add and delete them all the time. Here’s what the default site on Homestead looks like:

client1.local

client2.local

client3.local

In the example above, every time you need to add a new site, you have to create a folder, manually add it to Homestead.yaml, edit the host and all that stuff.

I wanted something more practical, so I created a single domain that hosts all my websites, and it looked like this:

e.local/client1

e.local/client2

e.local/client3

So, to create a new site, I just create a folder for it, and it’s ready to use. Another advantage is that I can quickly access the development enviroment on Google Chrome, because the auto-complete funcion doesn’t compete with the production website.

Example: Let’s say I have client1.local as my development environment, and client1.com as the production environment. To access the development website, I would have to type the whole domain up until .local for the auto-complete to differentiate between them. With that config, it gets easier to autocomplete.

The downside of it is that you lose granularity over specific PHP versions for specific projects, but if for some reason you want to use PHP 5.6 on some website, you can just create a new mapping for it as you would normally do, the above is just a convenience for generic projects.