After Installing

The Configuration page will give you some help getting things going after you get Nginx installed and the Pitfalls page will help keep you from making mistakes that so many users before you did. These two pages give you the chance to learn from others mistakes and hard work.

Binary Releases

Prebuilt Packages for Linux and BSD

Most Linux distributions and BSD variants have Nginx in the usual package repositories and they can be installed via whatever method is normally used to install software (apt-get on Debian, emerge on Gentoo, ports on FreeBSD, etc).

Be aware that these packages are often somewhat out-of-date. If you want the latest features and bugfixes, it's recommended to build from source or use packages directly from nginx.org.

Official Red Hat/CentOS packages

To add nginx yum repository, create a file named /etc/yum.repos.d/nginx.repo and paste one of the configurations below:

Due to differences between how CentOS, RHEL, and Scientific Linux populate the $releasever variable, it is necessary to manually replace $releasever with either "5" (for 5.x) or "6" (for 6.x), depending upon your OS version.

Official Debian/Ubuntu packages

Append the appropriate stanza to /etc/apt/sources.list. The Pgp page explains the signing of the nginx.org released packaging.

Ubuntu PPA

This PPA is maintained by volunteers and is not distributed by nginx.org. It has some additional compiled-in modules and may be more fitting for your environment.

You can get the latest stable version of Nginx from the Nginx PPA on Launchpad:
You will need to have root privileges to perform the following commands.

For Ubuntu 10.04 and newer:

sudo-snginx=stable # use nginx=development for latest development version
add-apt-repository ppa:nginx/$nginxapt-get update
apt-getinstall nginx

If you get an error about add-apt-repository not existing, you will want to install python-software-properties.
For other Debian/Ubuntu based distributions, you can try the lucid variant of the PPA which is the most likely to work on older package sets.

In addition, Kevin Worthington maintains earlier Windows builds of the development branch.

Source Releases

There are currently two versions of Nginx available: stable (1.4.x), mainline (1.5.x). The mainline branch gets new features and bugfixes sooner but might introduce new bugs as well. Critical bugfixes are backported to the stable branch.

In general, the stable release is recommended, but the mainline release is typically quite stable as well. See the FAQ.