Added on May 18th, 2012 and marked as install nginx webserver

(Update: how to install the latest nginx version)

Install nginx:

apt-get install nginx

Edit the nginx configuration file:

nano /etc/nginx/nginx.conf

Add the following lines if they are not already present:

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;

This will make sure that any file present in /etc/nginx/sites-enabled will be loaded as a config file. It’s good practice to make a symlink in /etc/nginx/sites-enabled to the corresponding file in /etc/nginx/sites-available.

And make sure the line index index.html index.htm; is changed into:

index index.php index.html index.htm;

Start nginx with the following command:

service start nginx