Install Nginx For Mac



  1. How to Install Nginx on MacOS Introduction. Nginx is a web server which can also be used as a HTTP cache, load balancer and reverse proxy.This was first created by Igor Sysoev and released in 2004 under the terms of BSD like license. In this tutorial, we will learn the steps involved in the installation of Nginx.
  2. Xiao Ling / April 6, 2014 October 29, 2019 / Mac / Mac, nginx 3 comments In this tutorial, I would like to show how to configure and install nginx on Mac OS X. My Mac system is Mavericks 10.9.2.
  3. Similar Software for Mac. Install pound on Mac OSX; Install sproxy on Mac OSX; Install squid on Mac OSX; Install pushpin on Mac OSX; Install pdnsd on Mac OSX; Install pwnat on Mac OSX; Install dircproxy on Mac OSX; Install sshuttle on Mac OSX; Install mockserver on Mac OSX; Install webfs on Mac OSX.

About the App

  • App name: nginx
  • App description: HTTP(S) server and reverse proxy and IMAP/POP3 proxy server
  • App website: http://nginx.org/

This tutorial shows how to install Nginx + PHP + MySQL on Mac OS Catalina. It’s very straightforward process and doesn’t takes you more than 10 to 15 minutes. Install PHP First of all, ensure that brew brew is up-to-date and then install latest php 7.4 version. To locate your ini files type the following.

Install the App

  1. Press Command+Space and type Terminal and press enter/return key.
  2. Run in Terminal app:
    ruby -e '$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)' < /dev/null 2> /dev/null
    and press enter/return key.
    If the screen prompts you to enter a password, please enter your Mac's user password to continue. When you type the password, it won't be displayed on screen, but the system would accept it. So just type your password and press ENTER/RETURN key. Then wait for the command to finish.
  3. Run:
    brew install nginx

Done! You can now use nginx.

Similar Software for Mac

Install with brew

Use brew to install the nginx with command:

After install run:

Testing

Open Navigator it by going to URL:

Configuration

The default place of nginx.conf on Mac after installing with brew is:

Changing the default port (8080)

We shall change it to 80. First stop the nginx server if it is running by:

Update thanks @zue666, @pixel67
if apache is running must also stop
sudo apachectl stop

Mac install nginx without homebrew

Then open nginx.conf with (example vim):

and change the:

to:

Save configuration and relaunch nginx

Testing

Open Navigator it by going to URL:

Mac Start Nginx

Update: thanks @pablohenrique
* ERROR 403 Forbidden - *
dont worry, some other application is already using port 80. probably be skype.

1 Solution 1: Change Skype port in Skype > Preferences > advanced
2 Solution 2: No change server { listen to 80.

That means that nginx will use port 8080 instead of 80. To access it I would use this url
http://localhost:8080.

Changing the path of defualt web location

he nginx html folder (brew install only) is by the defult in:

Note: change ** 1.2.3 ** to your nginx version.

The defualt path configuration:

To let say Users/to/www:

Install Nginx Mac High Sierra

After change relaunch nginix server and nginx is now serving pages from your custom folder!

Nginx Mac Download

enjoy!