Getting Started¶
Quick Install (Recommended)¶
The fastest way to install NGINX with modules is using NGINX Extras:
Requirements (Source Build)¶
| Library | Required For |
|---|---|
| zlib | gzip module |
| PCRE/PCRE2 | rewrite module |
| OpenSSL | SSL/TLS support |
Install on your system:
Installation from Source¶
Clone from GitHub or download from nginx.org:
Bash
# Extract and configure
tar xzf nginx-*.tar.gz
cd nginx-*
./configure
# Build and install
make
sudo make install
By default, NGINX installs to /usr/local/nginx. See installation options for customization.
Running NGINX¶
Start¶
Reload Configuration¶
Or using signals:
PID File Location
The default location is /usr/local/nginx/logs/nginx.pid. On Ubuntu, it's /var/run/nginx.pid.
Platform-Specific Notes¶
- Windows: NGINX for Windows (32-bit)
- Solaris: x86/64 builds available
- macOS: Install via Homebrew:
brew install nginx - Linux: Most distributions have packages in their repositories
Next Steps¶
| Topic | Description |
|---|---|
| Command-line options | Process signals and CLI usage |
| Debugging | Debug builds and troubleshooting |
| Optimizations | Performance tuning |
| Pitfalls | Common mistakes to avoid |