FAQ

Page Discussion History

Install

Contents

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.

Ubuntu PPA

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 -s
nginx=stable # use nginx=development for latest development version
add-apt-repository ppa:nginx/$nginx
apt-get update 
apt-get install 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.

sudo -s
nginx=stable # use nginx=development for latest development version
echo "deb http://ppa.launchpad.net/nginx/$nginx/ubuntu lucid main" > /etc/apt/sources.list.d/nginx-$nginx-lucid.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C
apt-get update 
apt-get install nginx

Win32 Binaries

As of 0.8.50, Nginx is now available as an official Windows binary.

The Windows version is provided as a binary-only due to the current build process (which currently uses some Wine tools). When the build process has been cleaned up, source will be made available. Igor does not want to support build issues with the current system.

Installation:

cd c:\
unzip nginx-1.0.4.zip
ren nginx-1.0.4 nginx
cd nginx
start nginx

Control:

nginx -s [ stop | quit | reopen | reload ]

For problems look in c:\nginx\logs\error.log or in EventLog.


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

Source Releases

There are currently two versions of Nginx available: stable (1.0.x) and legacy (0.8.x). There is typically a development branch as well, but focus at the moment is on stable. The development branch gets new features and bugfixes sooner but might introduce new bugs as well. Once bugfixes are stabilized they are backported to the stable branch. New features may or may not be backported.

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


Show all versions

Building Nginx From Source

After extracting the source, run these commands from a terminal:

./configure
make
sudo make install

By default, Nginx will be installed in /usr/local/nginx. You may change this and other options with the compile-time options.

You might also want to peruse the catalog of third-party modules, since these must be built at compile-time.

References

Original Documentation