12/5/24, 9:57 AM
How to Install Nginx on MacOS. In this tutorial, you will learn how to… | by Andrey Byhalenko | DevOps Manuals and Technical Notes | Medium
How to Install Nginx on MacOS
Andrey Byhalenko · Follow
Published in DevOps Manuals and Technical Notes · 2 min read · Jan 6, 2024
152
1
In this tutorial, you will learn how to install Nginx on a Mac using
Homebrew.
First, you need to install Homebrew. Homebrew is a package manager for
Max OS. It’s allowing us to install Unix applications easily. More information
is available here — https://brew.sh/.
https://medium.com/devops-technical-notes-and-manuals/how-to-install-nginx-on-macos-a4b50d63f921
1/8
12/5/24, 9:57 AM
How to Install Nginx on MacOS. In this tutorial, you will learn how to… | by Andrey Byhalenko | DevOps Manuals and Technical Notes | Medium
Run the following command to install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HE
After the installation, update the Homebrew repository:
brew update
Now install Nginx:
brew install nginx
The Nginx server will be installed at the location /usr/local/cellar. The entire
set of 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 8080. To start Nginx, use the
following command (bear in mind the correct version folder):
https://medium.com/devops-technical-notes-and-manuals/how-to-install-nginx-on-macos-a4b50d63f921
2/8
12/5/24, 9:57 AM
How to Install Nginx on MacOS. In this tutorial, you will learn how to… | by Andrey Byhalenko | DevOps Manuals and Technical Notes | Medium
launchctl load /usr/local/cellar/nginx/1.22.1/homebrew.mxcl.nginx.plist
To check whether Nginx is correctly installed on the computer, type the
localhost in the browser (127.0.0.1) or run the following command on the
command line:
curl http://127.0.0.1:8080
To stop the Nginx services, use the following command:
launchctl unload /usr/local/cellar/nginx/1.22.1/homebrew.mxcl.nginx.plist
The default location of the Nginx configuration file
is /usr/local/etc/nginx/nginx.conf .
Learn more about the Nginx configurations here — Nginx functionality.
https://medium.com/devops-technical-notes-and-manuals/how-to-install-nginx-on-macos-a4b50d63f921
3/8
12/5/24, 9:57 AM
How to Install Nginx on MacOS. In this tutorial, you will learn how to… | by Andrey Byhalenko | DevOps Manuals and Technical Notes | Medium
If you liked my articles, join my newsletter, and you will receive weekly
DevOps tutorials, articles, and tips every Saturday.
As a bonus, you will receive a free step-by-step DevOps CI/CD project, which
you can use in your portfolio.
Subscribe here: https://junior-devops-hub.ck.page
DevOps
Devops Practice
Nginx
Macos
Nginx Installation
Published in DevOps Manuals and Technical Notes
Follow
140 Followers · Last published Oct 28, 2024
Here I’m publishing DevOps-related technical manuals and notes. I’m writing
articles aimed at junior DevOps engineers or those aspiring to become DevOps
engineers.
Written by Andrey Byhalenko
Follow
3.1K Followers · 38 Following
I'm a DevOps Engineer, Photography Enthusiast, and Traveler. I write articles
aimed at junior DevOps engineers and those aspiring to become DevOps
engineers.
https://medium.com/devops-technical-notes-and-manuals/how-to-install-nginx-on-macos-a4b50d63f921
4/8
12/5/24, 9:57 AM
How to Install Nginx on MacOS. In this tutorial, you will learn how to… | by Andrey Byhalenko | DevOps Manuals and Technical Notes | Medium
Responses (1)
What are your thoughts?
Respond
Fran
Frank Woei
5 months ago
Hi Andrey - the MacOS links are not valid for my MacBook Pro running Sonoma should now be:
/opt/homebrew/opt/nginx/homebrew.mxcl.nginx.plist
2
Reply
1 reply
More from Andrey Byhalenko and DevOps Manuals and Technical
Notes
Open in app
Sign up
Search
https://medium.com/devops-technical-notes-and-manuals/how-to-install-nginx-on-macos-a4b50d63f921
Sign in
Write
5/8
20 Essential Linux Debugging Commands
and Tricks for DevOps Engineers.
12/5/24, 9:57 AM
10 DevOps Concept-Related Interview
Questions I got asked during 2024.
How to Install Nginx on MacOS. In this tutorial, you will learn how to… | by Andrey Byhalenko | DevOps Manuals and Technical Notes | Medium
D In DevOps Manuals and Techni… by Andrey Byhal… D In DevOps Manuals and Techni… by Andrey Byhal…
20 Essential Linux Debugging
Commands and Tricks for DevOp…
10 DevOps Concept-Related
Interview Questions I got asked…
In this article, I would like to share 20 Linux
debugging commands with the examples.
In this article, I will give examples of 10
common technical questions I got asked on…
Oct 28
142
1
Oct 9
321
2
DevOps Example Project for your Resume. How to land your first DevOps job.
CI/CD for the Python service using GitHub
Practical advice based on my own
Actions and AWS.
experience.
D
In DevOps Manuals and Techni… by Andrey Byhal…
DevOps Example Project for your
Resume. CI/CD for the Python…
Create a CI/CD for the Python service using
GitHub Actions and AWS.
Mar 14
619
12
See all from Andrey Byhalenko
Th
In The DevOps Mindset by Andrey Byhalenko
How to land your first DevOps job.
Practical advice based on my own…
In this article, I’ll provide you with practical
advice on how to improve your chances to…
Nov 4
110
3
See all from DevOps Manuals and Technical Notes
Recommended from Medium
https://medium.com/devops-technical-notes-and-manuals/how-to-install-nginx-on-macos-a4b50d63f921
6/8
12/5/24, 9:57 AM
How to host static website using NGINX
S Samarth Asthan
Host your static website using
NGINX- A Step-by-Step Guide
Hey folks, I’m Samarth Asthan, a 4th-year
computer science student, and today we will…
Jun 13
Everything You Need To Know About
Docker
How to Install Nginx on MacOS. In this tutorial, you will learn how to… | by Andrey Byhalenko | DevOps Manuals and Technical Notes | Medium
1
Ak
Akhilesh Mishra
Everything You Need To Know
About Docker
Devops zero to hero #3 — A Complete Guide
to start using Docker in your devops workflow
Jan 23
539
5
Lists
iPhone A Tech & Tools
displayingwith 21 stories · 362 saves
the new bea
person Productivity
using lapt 242 stories · 632 saves
for time-
General Coding Knowledge
20 stories · 1791 saves
Natural Language Processing
1844 stories · 1467 saves
How I Am Using a Lifetime 100% Free
Server
NGINX - Zero To Hero: Your Ultimate
Guide from Beginner to Advanced Mastery
H Harendra
S Saquib Khan
Get a server with 24 GB RAM + 4 CPU + 200
GB Storage + Always Free
Introduction to Nginx
How I Am Using a Lifetime 100%
Free Server
Oct 25
6.5K
95
Enable cors origin—Nginx
NGINX - Zero To Hero: Your
Ultimate Guide from Beginner to…
Aug 3
75
Deploying an Application Using Apache as
a Web Server
https://medium.com/devops-technical-notes-and-manuals/how-to-install-nginx-on-macos-a4b50d63f921
7/8
12/5/24, 9:57 AM
How to Install Nginx on MacOS. In this tutorial, you will learn how to… | by Andrey Byhalenko | DevOps Manuals and Technical Notes | Medium
H Hariharan
Enable cors origin — Nginx
1. Open NGINX Server Configuration
A dAaditya Kediyal (@iAadiDev)
Deploying an Application Using
Apache as a Web Server
Deploying an application using Apache as a
web server is a fundamental skill for web…
Sep 20
53
Jun 23
See more recommendations
https://medium.com/devops-technical-notes-and-manuals/how-to-install-nginx-on-macos-a4b50d63f921
8/8