Menu
There are many alternatives to nginx for Mac if you are looking to replace it. The most popular Mac alternative is Apache HTTP Server, which is both free and Open Source. If that doesn't suit you, our users have ranked more than 50 alternatives to nginx and many of them are available for Mac so hopefully you can find a suitable replacement. 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. Now let’s have a look how to install NGINX, PHP and MySQL on Mac OS local environment. Continue reading “How to Install NGINX, PHP and MySQL on Mac OS” Author Chatura Halwatura Posted on December 4, 2017 December 4, 2017 Categories Mac OS X, PHP Tags MySQL, NGINX, PHP 1 Comment on How to Install NGINX, PHP and MySQL on Mac OS. 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.
There are following steps to install the Nginx on Mac OS:
Nginx Mac Download
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: https://brew.sh/
Or simply type the following command on the terminal:
Step 2: Update the Homebrew repository index
Update the repository index of the Homebrew package installer. This can be done through the 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:
The 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:
- 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