I am trying to get wildcard subdomains for a local solution on my mac (OS X Yosemite).
The user creates his own site and, based on his username, they will have a username .project.mac (or * .project.mac).
I have a Homestead working correctly for www.project.mac , app.project.mac and project.mac , as these are predefined routes, but I need username.project.mac be dynamic.
.hosts
# Homestead 192.168.10.10 project.mac 192.168.10.10 app.project.mac 192.168.10.10 www.project.mac
Homestead.yaml
--- ip: "192.168.10.10" memory: 2048 cpus: 2 authorize: ~/.ssh/id_rsa.pub keys: - ~/.ssh/id_rsa folders: - map: /Users/me/Code to: /home/vagrant/Code sites: - map: project.mac to: /home/vagrant/Code/project/user.project.com/public - map: app.project.mac to: /home/vagrant/Code/project/app.project.com/public - map: www.project.mac to: /home/vagrant/Code/project/www.project.com/public databases: - homestead variables: - key: APP_ENV value: local
routes.php
Route::group(['domain' => '{username}.project.mac'], function ($username) { return $username; });
I even went through this tutorial: http://passingcuriosity.com/2013/dnsmasq-dev-osx/ , which seems to work to the very last point where I cannot resolve test.testing.mac when I try to ping . project.mac decides when I ping it.
I also edited /etc/nginx/sites-available/project.mac to server_name project.mac *.project.mac; according to this answer: https://laracasts.com/discuss/channels/general-discussion/homestead-and-subdomains/replies/46620
I have no idea what else to try.
source share