Set up Nginx on Windows, Linux, and macOS
Nginx is a high‑performance web server and reverse proxy. Follow these platform‑specific instructions to install it.
Windows
- Download the Windows build of Nginx.
- Extract the archive and run
nginx.exe
. - To start automatically, create a scheduled task or service pointing to the executable.
Linux
Use your distribution's package manager:
# Debian/Ubuntu
sudo apt update
sudo apt install nginx
# Fedora/CentOS/RHEL
sudo dnf install nginx
sudo systemctl enable --now nginx
macOS
- Install Homebrew if you don't have it.
- Run
brew install nginx
to install. - Start Nginx with
brew services start nginx
to run it in the background.
Once Nginx is running, you can configure it as a reverse proxy or web server.