This post is roughly 11 years old; originally published on March 14, 2013! The information presented here may be out of date and inaccurate.
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
deb http://nginx.org/packages/debian/ squeeze nginx
deb-src http://nginx.org/packages/debian/ squeeze nginx
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.