Installing nginx on Ubuntu

As part of my conversion from Chyrp to Jekyll, I decided to ditch Apache as well and start using nginx.


Installation is pretty easy on Ubuntu; there are official nginx packages available from Just add these lines to your /etc/apt/sources.list file and then apt-get update:

deb lucid nginx
deb-src lucid nginx

Then, install the nginx package:

apt-get install nginx


Configuration of nginx is really pretty simple; the default configuration lives in /etc/nginx/conf.d/default.conf. All I needed to modify was the root section in the location block to point to the _site folder of my local copy of the website:

location / {
    root   /var/www/;
    index  index.html index.htm;