If you’re using a Mac, Apache is already installed on your system; it’s just probably not enabled. Since this is the typical case, we’ll just go through the steps of enabling it rather than installing a whole new instance.
First, go to System Preferences on your Mac. Under Internet & Network, you’ll see an option for Sharing, as shown in Figure A-1. Click this option.
In the Sharing panel that opens, simply ensure that the Web Sharing option is selected (Figure A-2) to enable the Apache HTTP server.
Now, if you go to http://localhost in a browser, you should see a default page for your server. The Apache HTTP server should load files from the default document location on your Mac, /Library/WebServer/Documents.
18.226.185.87