- How To Find Your Localhost
- Localhost For Mac
- Mac Localhost Refused To Connect
- Mac Localhost Printer
- Set Up Localhost Mac
A quick how to guide on how to set up localhost on a Mac. This will help you create and test multiple websites locally on your computer. This is for version.
May 4, 2013 11:51 PM
Great guide, thanks John.
Make sure that your port number is correct. The URL should not literally say localhost:port. On some machines it’s localhost:80 and others it’s localhost:8888. You can find your port by opening the MAMP Preferences screen, and looking in the Port tab. The correct port number for you will be within the Apache Port box. The problem is, on the PC in my office, I set the 127.0.0.1 point to localhost in the system host file, then I can use localhost/admin to access the application after I started tomcat. I did the same on my mac. Everything was behaving precisely as expected. The localhost name is mapped to 127.0.0.1, and not to any network facing IP address. Thus 10.37.129.2, which was my Mac's IP on the virtual network shared with Windows running in Parallels, was never reaching localhost. This is correct and reasonable. All credit goes to klanomath.
How To Find Your Localhost
![Local Host For Mac Local Host For Mac](/uploads/1/2/6/4/126429341/199484982.png)
Just a note, in case anyone has the same issue. At first I couldn't get this to work. I tried logging out and back in (still no joy), then restarting the mac (still no joy).
Localhost For Mac
Try doing both of those first. However, if, like me, you still can't get the local host site to load, try the following: You should find a file at /Library/WebServer/Documents/index.html.en . This contains the text 'It works!' referred to in the post. What I did was duplicate that file in the same folder and changed the duplicate's name to 'index.html', leaving the original in situ.
Mac Localhost Refused To Connect
Both local and user sites then loaded. After which, I was able to delete the duplicated file and everything now works without issue. Just to be clear, leave the original file index.html.en where it is, untouched and unharmed throughout this step.
Mac Localhost Printer
Not sure why I had to take this mysterious detour - probably something local to my machine, but if you're having trouble after following the guide above, see if it helps.
Set Up Localhost Mac
May 4, 2013 11:51 PM