I have recently moved away from using Mamp Pro in favour of a XAMPP, an open source alternative for setting up and running your local development.
Get XAMPP
There are three main steps
1. Editing /etc/hosts to ensure your new domain is set up. If I am looking to set up testing.loc then I will need to add a line into my /etc/hosts. You can edit this via the terminal command $ sudo nano /etc/hosts127.0.0.1 testing.loc
It should be noted that you will need to set up an option for www. and any other subdomains you require as it is not possible to use wildcards. NB I am happy to be corrected on this point
127.0.0.1 testing.loc www.testing.loc sub.testing.loc sub2.testing.loc
2. Setting up your Virtual host configuration via the httpd.conf which should be under Applications/XAMPP/etc/httpd.conf then it’s a case of adding a <VirtualHost> instance for each site.
<VirtualHost *:80>
DocumentRoot /www/testing/
ServerName testing.loc
ServerAlias www.testing.loc
ErrorLog logs/test.loc-error_log
CustomLog logs/test.loc-access_log common
</VirtualHost>
Update Before the first instance of these Virtual host entries you will need to declare NameVirtualHost *:80
NameVirtualHost *:443
3. Create the directory that you are going to be working out of. This should match what you have got set in DocumentRoot of the VirtualHost. In this instance I would set this up with the following Terminal commands
$ mkdir /www/testing
$ cd /www/testing
$ touch index.php
$ nano index.php