MAMP
Before attempting to setup a local domain ensure MAMP has the following setting:
- Ports
- Apache 80
- Nginx 7888
- MySQL 3306
- Web Server
- Server Apache
- Document Root Applications/MAMP//htdocs (or personal preference)
Local Domains
- Create the local URL you want to use
- Go to Macintosh HD/private/etc/hosts
- At the bottom add….
127.0.0.1 example.ld
- Save file
- Ensure Virtual Hosts is enabled in your server Conf file
- Go to Applications/MAMP/conf/apache/httpd.conf
- Uncomment the following line…
Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
- Save file
- In the Virtual Hosts file configure your local domain settings
- Go to Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
- At the bottom adding the following:
<VirtualHost *:80> ServerAlias example.ld ServerAdmin [email protected] DocumentRoot /Applications/MAMP/htdocs/example </VirtualHost>
Testing
To test your domain is working, go to the following URL
- http://example.ld