MAMP is a very handy server environment for web stuff, here’s what i do to set it up:

use my ‘Sites’ folder as document root - basically keep it out of the MAMP application so when i upgrade mamp or migrate my user folder it keeps my stuff

Change the apache port to 80 - that way my urls look normal and don’t have the colon/port number after them
read more about all that here:
https://www.mamp.info/en/documentation/
I like to make virtual hosts for all my development websites. I call them sitename.dev, rather than their online equivalent sitename.com for instance. This makes lots of things work better (i.e. the same document root for your code).
edit your hosts file here: /etc/hosts
I install the terminal command for TextMate and Sublime, so currently I type this in terminal to open that file:
sublime /etc/hosts
add a line to this file that looks like this:
127.0.0.1 yoursite.dev
The open this file within the MAMP application:
/Applications/MAMP/conf/apache/httpd.conf
Find this line (use the find tool - its around line 584 on mine, but this sort of thing changes):
# Virtual hosts
#Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
remove the hash before ‘Include’ so it looks like this:
# Virtual hosts
Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
Then go to this file:
/Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
There are various examples there, but the minimum you need (and i never use any more than this) is below. You must redefine ‘localhost’ to be the same folder you set up as the MAMP document root above. Then you can define as many virtual hosts as you like with the second bit:
<VirtualHost *:80>
DocumentRoot /Users/yourusername/Sites/
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot “/Users/yourusername/Sites/sitefolder”
ServerName yoursite.dev
</VirtualHost>
In the above example yourusername is your user folder, sitefolder is the folder you’ve got your site in, yoursite.dev is what you defined in the /etc/hosts file.
Now stop, then start the MAMP server and you should be able to go to yoursite.dev and it will work.
A hand trick to find the exact location of a file/folder in the way that MAMP and many other bits of software expect to see it is to grab the file and drag it into a terminal window - you can then copy this path, much quicker than typing it.