I am trying to establish a stable AMP stack that will support multiple localhosts in a single physical environment. In my case it is a MAMP stack because I am using a Macbook pro (Sierra). I have tried both MAMP and MAMP Pro. My problem is in correctly setting ports. I have the choice setting ports to (Apache) 80, (Nginx) 81, (Apache SSL) 443, (Nginx SSL) 7443, (MySQL) 3306. Alternatively, I can use MAMP Defaults Apache (8888/8890), Nginx (7888/7890), MySQL (8889). I can get either option to work on MAMP. I can only get the default option to work on MAMP PRO. MAMP makes setting up multiple localhosts more complex. Specifically I am having port conflicts with MySQL. I am told that using the defaults I may encounter conflicts with WordPress (also in the mix).
That is the context.
My real question is this. I am not looking for an answer to this specific problem. I am looking for suggestions to what I need to study to gain the knowledge I need to troubleshoot this problem myself. I'm not totally confident I know what a port is, nor how to assess my environment to try and resolve conflicts. I want to understand the underlying issues, technologies, etc. I want to know where to begin to look, what tools to use, what the relationships are between the technologies; basically I want to know how to get "under the sheets" and look for answers myself before I have to come to the forums and get help for the really nasty problems. I love the forums, don't get me wrong. I have learned a lot from them. But, I have also burned hours and days waiting to get answers and then realizing that even though I got an answer, I don't know why it is an answer so I probably won't be able to get myself out of a similar problem later.
So, guidance please on resources for understanding the AMP stack "under the sheets" so that when things don't work "out of the box" I can at least understand the issues well enough to begin the troubleshooting process. I hope this is the right place to ask that question.