I ran into the same problem. I fixed it by trying a bunch of things on the gist your pasted in. After some head scratching I decided to reboot my machine like it was a Windows machine.
@devronbaldwin Fixed it for me too. I had considered trying a reboot, but I was in the middle of downloading a massive backup and couldn't until it was finished.
@tmartin31 no problem. The new Valet is faster but has a few issues around WordPress sites and .htaccess I think. I've reverted to 1.x for the time being. That's a 2017 problem for me.
I am getting "502 Bad Gateway nginx/1.12.2" error but only on the the site front-end the wp-admin of the site works just fine. Any idea? I even restarted my computer and I am still getting the same error. I turned on wp_debug and I not getting anything. The site works on a production server. Its just on my local dev server where I am using valet