How to Run a Local Web Server on Windows and OS X

Started by DeveloperOnRent, Aug 12, 2022, 05:10 AM

Previous topic - Next topic

DeveloperOnRentTopic starter

You have an idea for a cool website, a plan to implement it, but at the same time you want to open the doors to visitors only when everything is really finished and tested? There is nothing easier, because you can run a web server for a website right on your computer, and postpone the purchase of hosting until the project is ready.

Now we will talk about a local web server, available for both Windows and OS X. At the same time, its key feature is the presence of a simple and intuitive interface. You don't have to be a bearded administrator to run a webserver. It is enough just to carefully read the instructions, and you can easily revive the local version of the site.

So, meet MAMP and MAMP PRO. The first one is free, but with reduced features, which will still be enough for most of your needs. The second one is paid, it will cost $500. If after reading this you decide to download MAMP or buy MAMP PRO, welcome to the developer's website.

First, let's talk about the free version of MAMP, because it's the easiest way to get started with a local web server. Immediately after installation, you will have a working web server with Apache, MySQL and PHP.

After launching MAMP, you will see a simple menu of the most requested options. You can start or stop the web server, go to the main page of the web interface, or change any settings. You can configure ports for Apache and MySQL, select the PHP version and specify the root folder of your project. In general, even with the default settings, you can start working.

There are incomparably more options for configuring MAMP PRO. What's more, MAMP PRO is an add-on for the free MAMP, so it can be installed at any time without harm to your current project. If you feel that the free version does not permit you to turn around, then moving will not be a hassle.

Now let's quickly go through the differences between MAMP PRO.

The developers are betting on extra security and recommend running a web server in MAMP PRO under the www/mysql entry. This is especially true if the computer is constantly connected to the Net. The full version also allows you to enable or disable individual Apache modules.

The advanced MySQL options are also focused on security. You can set or change the main MySQL password, as well as restrict access to your database from the outside. Error logs are available for both Apache and MySQL, which can be helpful.

There is a full version of the web server and support for Dynamic DNS. You can match the site name and your current IP address. In addition, there is support for the and providers. It is enough to have an account with one of them to take advantage of Dynamic DNS support.

MAMP PRO will permit you to set up sending emails from your local web server if the need arises.

The paid version also features the ability to create an unlimited number of hosts with minimal effort. In other words, you can run multiple sites at the same time. Free MAMP is limited to just one.

MAMP and MAMP PRO are the friendliest solutions for local web servers. A clear interface and detailed documentation will permit you to quickly understand all the intricacies. The need for an expensive paid version may arise if your work on a site or several resources goes beyond mere curiosity. This is a serious tool for web developers.


On Mac laravel valet + mysql via brew and sequel pro as a visual client is like a breath of fresh air after vagrant or mump.


As a net programmer under Windows, it's still better to use OpenServer, it has orders of magnitude more tools and options than in the paid MAMP PRO. And I don't even know what to pay for.

Macos comes with PHP and Apache out of the box. In the simplest case, just php -S localhost in the right folder and voila the web server is up and running. Next, install brew and deliver what you need.

Generally, it is better to use vagrant both there and there. The benefit of ready-made images with LAMPs is full.


To run a local server on a PC, you will have to change the settings of some programs or the operating system. For servers to work, port 80 must be freed. This is often occupied by Internet Information Services (IIS).
To verify this, enter the command netstat -aon | findstr 0.0:80. If port 80 is indeed occupied by a system process, you will see the value "4" in the last column in the dialog box.

To disable IIS, in the Control Panel, select Programs and Features - Turn Windows features on or off. Uncheck the box next to the "IIS" option and save the changes. A system reboot may be required.