Return to site

Localhost Server For Mac

broken image


Your computer's network address is provided by the Domain Name System (DNS) server your computer uses. If you don't use a DNS service, the network address is derived from your computer name. See also Change your computer's name or local hostname on Mac Connect your Mac to shared computers and servers Network address formats and protocols. XAMPP is a completely free, easy to install Apache distribution containing MariaDB, PHP. Choose the Servers tab. At the bottom of the box on the right, click +. On the Basic tab, provide a Server Name, set Connect using to Local/Network, ensure the Server Folder matches the local site folder you specified in step 2, and set the Web URL to Click the Advanced. How do I allow any device, e.g., iPhone, to connect over a WLAN to my Mac's localhost server? On my Mac, I'm running a 'Hello World' HTTP Node.js server that serves a page, which Safari opens. 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.

We've already covered the topic of installing a local server on a PC and since I don't want to be one of those who disses Mac users we're going to learn how to setup a server on a Mac (we'll use MAMP for that). MAMP stands for Macintosh, Apache, MySQL, and PHP. As everything on Mac, it's gonna be really easy and you're not supposed to have a Ph.D in any discipline to cope with that. Now, why bother at all? Well, you may need a local server on your Mac if you want to test-drive some WordPress plugins or widgets. Alternatively, you may want to tweak some settings on your WordPress but you don't really feel comfortable doing that on a live site.

In case you're already running a SaaS business, you may want to make sure that your SaaS onboarding process is not holding you back.

By the way, you can check awesome Drupal code snippets if you want to install a local server for running Drupal on your local machine (computer).

Before we actually get started, let me explain why you need specifically MAMP on your Mac but not something else:

  • it's user-friendly (easy to install and use)
  • it's compatible with Mac (duh!)
  • it's exactly what the doctor ordered (no redundant stuff you don't actually need)

So, let's do it.

Screencast: How to Setup MAMP on Your Mac

For starters, check out the video that explains how to get MAMP on your Mac. If you're not sure about something, don't hesitate to leave your questions in the comments.

Step-by-Step Instructions on MAMP Installation

  1. To get the ball rolling, you need to go to mamp.info
  2. Once you're on the site, you need to just click the large logo with an elephant
  3. Now you copy of MAMP should start downloading.
  4. When your download is complete, double-click the MAMP .pkg file to unzip it and start installing
  5. That done, just click the Continue button in the dialog window that appears
  6. The next dialog box (window) will explain you what it's about to install, just click Continue if you agree
  7. Now you need to read the Software License Agreement, make sure that it's Ok with you and click Continue if it's the case
  8. And before you start the actual server installation you can see the info about what exactly will be installed on your Mac and how much space it'll take up
  9. Once you click the Install button, it'll prompt you to enter your Mac login and password to make sure that you're authorized to install software on your Mac (if you're not, stop using the Mac that does not belong to you! :))
  10. And now the actual installation should finally start
  11. You should be good to go within 5 minutes (as you can see on the screenshot above)
  12. With that done, just close the window and you can go to your Applications to run the MAMP you've installed a minute ago. Just click on the big elephant icon in the Applications => MAMP folder
  13. Once you can see your MAMP server dialog window, just click the Start Servers button to get your local server started
  14. When you see both the Apache Server and MySQL Server dots get green, you're up and running with your MAMP local server. You've installed it! Damn, you're AWESOME
  15. Once your servers got started, you (your browser) will be redirected to http://localhost:8888/MAMP/?language=English where you'll be able to see basic info about your server that you've installed locally
  16. If you want to see more specific and comprehensive info about your server, you can click the phpinfo link
  17. Now you can run your .PHP files, you just need to put them in the htdocs folder.

In Conclusion

And that's about it. As you could see for yourself, it's not rocket science at all, but it surely requires a bit of patience. Now you can install any CMS (like WordPress, Joomla, Drupal and the like) or just run php files for educational purposes if you happen to be learning PHP at the moment. In either case, it's really convenient to have a real life server at your disposal.

How To Start Localhost Server

Should you have any questions regarding this tutorial, by all means, let me know in the comments.

Minecraft server localhost

May 4, 2013 11:51 PM

Great guide, thanks John.


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).


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.


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.


Localhost Web Server

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.

May 4, 2013 11:51 PM

I am using excel 2011 for Mac and was waiting for the new excel version for Mac (2016) to enjoy some improvements. But it seems that I'd better stay withmy present 2011 version, as limited as it can be, where I can insert an user form and proceed in my work. Forms in excel for mac.





broken image