Installing nginx on a Debian (Squeeze) 6.0 and (wheezy) 7.0
Installing nginx on a Debian (Squeeze) 6.0 and (wheezy) 7.0

My webserver of choice is nginx, it’s resource friendly, fast, reliable and versatile.

I have a resource constrained Debian 6.0 “server” and wanted to deploy nginx on it for testing. Sadly, the nginx package in the Squeeze repositories is very old. Fortunately, the nginx team maintain a Debian package repository.

Add the nginx repository.

sudo nano /etc/apt/sources.list.d/nginx.list

Squeeze

deb http://nginx.org/packages/debian/ squeeze nginx
deb-src http://nginx.org/packages/debian/ squeeze nginx

Wheezy

deb http://nginx.org/packages/debian/ wheezy nginx
deb-src http://nginx.org/packages/debian/ wheezy nginx

Download the nginx package signing key.

wget http://nginx.org/keys/nginx_signing.key

Add the nginx package signing key to the keyring.

sudo apt-key add nginx_signing.key

Update the repositories.

sudo apt-get update

Install nginx.

sudo apt-get install nginx

I run ufw on my VPS so use the following to allow external access to my website.

sudo ufw allow 80/tcp

nginx is installed and can be configured in the usual way.

References