Most Mac developers I know, use MAMP, Vagrant or even the built-in PHP server to serve and develop their sites locally.
All of these have their pros and cons:
.htaccess
files can also cause issues.Enter Valet.
Valet is another creation by Taylor Otwell, owner of the Laravel framework.
If like me, you keep all your sites in a central folder (repos
in my case), you can point Valet to this folder, run valet park
and voilà, your blog/
directory will then be accessible at blog.dev
.
If your sites are scattered across multiple locations on your machine, just navigate to your project and add each one with $ valet link app-name
.
Valet will even automatically start each time your machine boots up.
Hopefully, this will help to develop your local sites much easier!
For more information and a guide to how to get started, see the Valet docs.
Update: Valet has just been updated to use Caddy, instead of PHPs built in server. This means that it won't be long before extra features such as automatic HTTPS via LetsEncrypt is added. All the more reason to use Valet!
Update 2: Valet since switched to using Nginx. Support for automatically creating self signed SSL certificates was also added using valet secure
.