NGINX is one of the most popular web server suites deployed across the internet. It's efficient, versatile, and works well on pretty much any Linux distribution. Whether you need a local server for testing, or want to host a website for the masses, NGINX is easy to set up. It can also be used as a reverse proxy server.
- $ brew install nginx Once the installation is complete, the next job would be to configure auto-start for NGINX. As we would be running the application in the default HTTP port 80, we would require root privileges (Privileged ports.
- NGINX is one of the most popular web server suites deployed across the internet. It's efficient, versatile, and works well on pretty much any Linux distribution.Whether you need a local server for testing, or want to host a website for the masses, NGINX is easy to set up.
- Homebrew is the painless way to install required packages on your Mac. For instance, we can install PostgreSQL, Python, PHP, Bash, Nginx, Apache, and much more using brew command. This page explains how to install and use Homebrew on the macOS system to get missing packages.
Step 1: install Passenger package
You can install Passenger through Homebrew:
Not using Homebrew? Please go back to the operating system selection menu and choose 'Other' as operating system.
Step 2: enable the Passenger Nginx module and restart Nginx
Passenger is now installed, but it still needs to be enabled inside Nginx. Run brew info nginx --with-passenger
and follow the instructions in the 'Caveats' section:
Brew Nginx
When you are done following the instructions, restart Nginx:
Step 3: check installation
After installation, please validate the install by running sudo /usr/local/bin/passenger-config validate-install
. For example:
All checks should pass. If any of the checks do not pass, please follow the suggestions on screen.
Finally, check whether Nginx has started the Passenger core processes. Run sudo /usr/local/bin/passenger-memory-stats
. You should see Nginx processes as well as Passenger processes. For example:
Mac Install Nginx Without Homebrew
If you do not see any Nginx processes or Passenger processes, then you probably have some kind of installation problem or configuration problem. Please refer to the troubleshooting guide.
Brew Nginx Not Starting
Install Homebrew
Paste that in a macOS Terminal or Linux shell prompt.
The script explains what it will do and then pauses before it does it. Read about other installation options.
What Does Homebrew Do?
Homebrew installs the stuff you need that Apple (or your Linux system) didn’t.
Homebrew installs packages to their own directory and then symlinks their files into
/usr/local
.Homebrew won’t install files outside its prefix and you can place a Homebrew installation wherever you like.
It’s all Git and Ruby underneath, so hack away with the knowledge that you can easily revert your modifications and merge upstream updates.
Homebrew complements macOS (or your Linux system). Install your RubyGems with
gem
and their dependencies withbrew
.“To install, drag this icon…” no more. Homebrew Cask installs macOS apps, fonts and plugins and other non-open source software.
Donate to Homebrew
Homebrew Blog
Analytics Data
Homebrew was created by Max Howell. Website by Rémi Prévost, Mike McQuaid and Danielle Lalonde.