Note: I am not going to lie, I know pretty much nothing about apache, servers, local host, etc so please pardon my ignorance - if there is a comprehensive or a great review out there for these things, please point me in their direction. I did try and read some online tutorials such as this one, but this all seems to be more than I need.
Context
I have some learned and then made some minimal PHP code that I want to test locally. However, that appears to mean that I need to use a server. Apparently LocalHost can serve that purpose. So I have made a directory ~/Sites
which stores different directories each housing a small website (each with subdirectories such as assets, css, js, etc and the actually html pages).
Question
How do I set-up whatever I need to set-up so that I can specify the root of one of this small websites (e.g. ~/Sites/a_website/index.html
) as the local host so I can see if my PHP code works?