Open source softwares - NGINX

Back to Course

Lesson Description

Lession - #617 Installing NGINX on Mac

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 should be introduced on the framework. Homemade libation is a bundle administrator for Mac working framework that permits us to effectively introduce different Unix applications. On the off chance that you don't have Homebrew, utilize the accompanying connect to introduce: https://brew.sh/ Or on the other hand essentially type the accompanying order on the terminal:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install>

Step 2: Update the Homebrew repository index

Update the store file of the Homebrew bundle installer. This should be possible through the blend update order.

$ brew update  

Step 3: Install Nginx The homebrew package installer will assist with introducing the Nginx web server on the macOS. To introduce the Nginx, utilize the following command:

$ brew install nginx  

The Nginx server will install on the location/usr/local/cellar. The whole executable administrations connected with beginning and halting Nginx are put away inside the canister envelope of the establishment catalog. The web server will tune in naturally on port number 8080. To begin the Nginx, utilize the accompanying command:

$ launchctl load /usr/local/cellar/nginx/1.17.0/homebrew.mxcl.nginx.plist   

What's more, to check whether the nginx is accurately introduced on the PC, type the localhost on the program or run the accompanying order on the control center:

$ curl  
To stop the Nginx services, use the following command:

$ launchctl unload /usr/local/cellar/nginx/1.17.0/homebrew.mxcl.nginx.plist   

Important locations: Add configs in -> /usr/local/etc/nginx/servers/ Default config -> /usr/local/etc/nginx/nginx.conf Logs will be in -> /usr/local/var/log/nginx/ Default webroot is -> /usr/local/var/www/ Default listen address -> http://localhost:8080