Skip to content

How to install a web server on Mac

15 September, 2018
You will learn how to INSTALL a WEB SERVER on MAC, as well as CONFIGURE the web server. Includes installation of PHP, Apache and MySQL.

In this post you will learn how to install a web server on Mac, as well as CONFIGURE the web server. It includes installing PHP, Apache and MySQL. ENTERS!

 

Attention: I am not responsible for the use that is made of it. The cracked licenses are external to a website and are not hosted on my server.

WE START:

Welcome to another post.

Today we will learn how to install a web server on Mac, in addition to configuring the server.

When creating a web page, it will be necessary to have a server, where we host our files, as well as a domain.

If it is a very large web page, it is advisable to try to do it on a local server.

If a paid hosting is hired before starting to make the page, it will be a long time that we lose until it is finished and ready to upload.

On the other hand, if we use paid hosting to make the website from scratch, we risk having a bad SEO.

As we move forward, many changes can be made that in the future will become 404 pages. This is why I recommend using a local server first.

Article index

But, What is a local server?

A local server is a computer, like yours, like mine.

It is a server, which is used to carry out tests or tests, and thus correct errors or details of the site, in addition to making the necessary changes on our website.

Until we are 100% safe, we can FTP the site and have it online.

What will I need to install a web server on Mac?

These are the applications that you must have to make your web server work:

  • Operating system. Linux is normally used, although you can use Windows or Mac.
  • Apache. This application will allow you to turn it into a total web server.
  • MySQL. It will allow to create databases, in which we will save the data of our project. This is managed by the previous application.
  • PHP. It is a programming language that runs on the server side.

We are going to install these applications at once with a special program. You can install them on your own, but yes: it will take longer.

Previously, this package was called LAMP (Linux, TOpatch, MySQL and PHP). Today, it can be found on Mac under the name of MAMP, and for Windows under the name WAMP.

There is another called XAMPP, but I go better with WAMP, it is easier for me to install servers on Windows.

As this tutorial is in relation to Mac, WE WILL USE THE MAMP. Click on the link to go to its official page, where you can download it.

Now how do I install a web server on the Mac?

Once you have downloaded the MAMP, you must install it (it is a .dmg or .pkg image):

  1. You have to open the installer, the following image will appear:
We recommend you:  How should a programmer take care of his health?

Install the most prominent application to install a web server on Mac.

  1. Click on "Continue", then click on "Continue", then on "Continue" and accept the terms, click on "Accept", and after that on "Install".
  2. Once the application is installed, run "MAMP PRO" (path: Applications / MAMP PRO / MAMP PRO), this is where we are going to patch the program, so that it is totally FULL.

  3. You will get a pop-up window, asking you to buy the product or to register a code, click on «Register».

  4. Go to this page, and generate a code to enter it, and once you get it, enter it in MAMP PRO and click "OK".

  5. Ready! You have already installed a web server on Mac.

I have already installed a web server on Mac, how to configure the server?

We have already successfully installed the web server on the Mac, now we only need to know where to configure it, where the site's root folder will be, where to edit databases, etc.

Web server setup for Mac

When you entered the default license, it should have redirected you to the program's start panel, but if not, go to "Applications> MAMP PRO", and run the "MAMP PRO" program.

When it is open, the following image will appear:

This is where you will find everything you need to adjust the MAMP.

This is where you can configure everything. From general adjustments to Postfixes. Depending on your needs, this is where you can configure the server to your liking.

Root folder

The folder where the server files will be stored (or root folder) is in "Applications> MAMP> htdocs".

How to view local site on Mac?

To access to view the website, you will have to enter the browser and type "localhost" or "127.0.0.1" in the address bar.

This is the preview that the local server does work.

Where to edit phpMyAdmin databases on Mac?

The path to enter the phpMyAdmin is "localhost / phpMyAdmin", enter that address in the browser.

Where do I get the logged errors and databases on Mac?

Inside the folder «Applications> MAMP» there is a file called «README.rtf», it is a text file, here comes the answer.

Warning: Do not run "Applications> MAMP> MAMP" instead of "Applications> MAMP PRO> MAMP PRO", because it may cause unwanted errors in the long term or short term. Use only MAMP PRO.

And well, that was it. Now you know how to install a web server on Mac. If you think your friends will be interested in this piece of post, please share it!

Before concluding, I would like to invite you to see more articles for programmers, surely there will be something you like.

In the same way, we LOVE talking more things related to Mac. Give us a look!

Were you able to install a web server on Mac successfully? We want to know, give us your opinion in the comments!