Homebrew MAMP setup w/ wildcard DNS for local dev

erutan's picture

I got a little frustrated dealing with MAMP and decided to setup my own local dev environment - I found a good gist outlining it, but I encountered a typo and had to update the PHP section a bit so I forked it. I added in DNS (hence the DNS section being less super auto copypaste cool). ;)

So far it seems to be working - you can (if you wish) shift between PHP versions etc by binding/unbinding in homebrew, and DNS is handled by dropping a folder into ~/Sites - so ~/Sites/foobar becomes foobar.dev/. No phpmyadmin bundled, but http://www.chive-project.com/ is prettier anyways and you can just drop that in.

https://gist.github.com/4498023

note: I'm not really a sysadmin, I know enough to manage small servers, etc but this is a little bit out of my focus of frontendish stuffs. :)

Comments

Errr...

Kristen Pol's picture

Sounds scary to me but glad it's working for you!

i've been liking it

erutan's picture

just drush make in ~/Sites/foo and boom, you can visit it at foo.dev. it's kinda magic.

Chive gives me a 500, but sqlbuddy works fine. Drupal and Expression Engine work great too. Mileage may vary due to VirtualDocumenRoot in Apache. You could setup nginx as well and have it go to a different tld, foo.local etc but I haven't bothered to play around with that much.