Nginx is a Web server used to serve HTTP requests over the Internet.
Nginx is available on Linux, Windows and other OSes as direct download, and can also be built from source. For detailed instructions see Nginx official reference.
ubuntu/debian
nginx stable version is available in official repo, it can be installed using
sudo apt-get install nginx
It will install and configure system startup files, but if you need latest version, you may need to add official ppa.
sudo add-apt-repository ppa:nginx/stable
sudo apt-get update
sudo apt-get install nginx
above instructions will install latest stable edition.