Fun With MAMP

MAMP is great to run local websites for development. Early on, a problem I ran into was having to switch my “localhost” URL everytime I changed projects! No fun at all. And of course, I didn’t want to buy the Pro version. What’s a guy to do?

Enter Fun

Yeah! So with some fine tuning, I do two easy things now when I start a project.

First, I set up an entry in my hosts file like “mysite.local”.

Second, in MAMP apache config folder, find your httpd.conf file. Just open that up and edit it by adding a Virtualhost declaration. Something like:

<VirtualHost *>
DocumentRoot /Users/computer-username/Sites/projects/mysite/src
ServerName mysite.local
</VirtualHost>

Your DocumentRoot will vary. I am on a macbook so this is the path (it will be different for PC). Just change out “computer-username” and your correct path.

Now restart MAMP and try “https://mysite.local” in your browser and enjoy.