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!
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.
- 1 But what is a local server?
- 2 What will I need to install a web server on Mac?
- 3 Now how do I install a web server on the Mac?
- 4 I have already installed a web server on Mac, how to configure the server?
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):
- You have to open the installer, the following image will appear:
- Click on "Continue", then click on "Continue", then on "Continue" and accept the terms, click on "Accept", and after that on "Install".
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.
You will get a pop-up window, asking you to buy the product or to register a code, click on «Register».
Go to this page, and generate a code to enter it, and once you get it, enter it in MAMP PRO and click "OK".
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 can configure everything. From general adjustments to Postfixes. Depending on your needs, this is where you can configure the server to your liking.
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.
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.
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!