valet: Problems with valet on fresh install of macOS Sierra, PHP7.1 Homebrew and Valet 2.0.3
Hi,
I am having an issue with getting valet to work.
I just went through and did a clean install of Sierra, Homebrew, PHP7.1 and composer (and a few other simple utilities).
I then issued composer global require laravel/valet.
I then issued a valet install which went ahead an installed nginx and dnsmasq via homebrew and then reported that valet was successfully installed.
I issued a valet start and then tried to ping foo.dev
Ping replied back
ping: cannot resolve foo.dev: Unknown host
I restarted the machine, and same thing.
I uninstalled everything, then manually installed nginx and dnsmasq through homebrew, then reinstalled valet.
Same issue.
Checking brew services list does not list dnsmasq as an active service, however ps -ax | grep dnsmasq display a process that has a time of 0:00.00 and refreshing the ps shows that dnsmasq is constantly restarting (process ID is different on each reload of ps -ax | grep dnsmasq).
The same is true for nginx.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 27 (8 by maintainers)
Try to delete
~/.valet,/usr/local/etc/dnsmasq.confand reinstall valet.What happens if you also run:
You may need to configure dnsmasq to do some logging output, and then use that to find out why it’s not routing foo.dev for you.
ALSO: what’s your Mac set to use for DNS?
127.0.0.1for dnsmasq to fire properly.I had problems with this too and finally it worked out once I have installed it with sudo
sudo install valet[EDIT: Updated .dev to .test since that’s the default now. And the relocated valet config folder]
As I posted in #115, try using the following as your
~/.config/valet/dnsmasq.conffile contents, andsudo brew services restart dnsmasqWhat needs to happen is this:
server=entries (I recommend using 1.1.1.1, but you could use 8.8.8.8 or 4.4.4.4 or use the OpenDNS ones I gave above)But if something in your Mac is interfering with sending DNS traffic to the IP:port that dnsmasq is listening on, then you’ll need to figure out what that is and adjust accordingly.
Like you, I’m a little surprised that a fresh macOS install is having any of these issues. 😦
Besides
*.devdoes not work anymore since it is a realTLD. So use something else like*.testor*.local.This worked for me