How to make MAMP include your local VirtualHosts

If you, like me, like to define your own VirtualHosts, and don’t like re-defining them every time you upgrade MAMP, there’s a solution. Store your virtual hosts in a separate place, and then just include them in the MAMP httpd.conf. Since Macs have Apache built in, I store all my custom VirtualHosts in:

/private/etc/apache2/extra/httpd-vhosts.conf

Edit MAMP’s apache configuration file located at:

/Applications/MAMP/conf/apache/httpd.conf

..And append the following line at the end:

Include /private/etc/apache2/extra/httpd-vhosts.conf

Then restart MAMP, and you’re done!

Leave a Reply

Your email address will not be published. Required fields are marked *