Javatpoint Logo
Javatpoint Logo

Installing NGINX on Mac

There are following steps to install the Nginx on Mac OS:

Step 1: Download Homebrew

To install the Nginx on Mac OS Homebrew must be installed on the system. Homebrew is a package manager for Mac operating system that allows us to install various Unix applications easily.

If you don't have Homebrew, use the following link to install:

Or type the following command on the terminal:

Step 2: Update the Homebrew repository index

Update the repository index of Homebrew package installer. This can be done through brew update command.

Step 3: Install Nginx

The homebrew package installer will help to install the Nginx web server on the MacOS. To install the Nginx, use the following command:

Nginx server will install on the location /usr/local/cellar. The entire executable services related to starting and stopping Nginx are stored inside the bin folder of the installation directory.

The web server will listen by default on port number 8080. To start the Nginx use the following command:

And to check whether the nginx is correctly installed on the computer, type the localhost on the browser or run the following command on the console:

To stop the Nginx services use the following command:

Important locations:

Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA