nginx + php-fpm

In the nginx config file( on ubuntu its /etc/nginx/nginx.conf )

    listen  80;
    autoindex on;
    root /home/mraiur/work;
    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;

Also we need to configure the php-fpm to serve on port 9000. We set it in the www.conf ( on ubuntu its in /etc/php5/fpm/pool.d/www.conf )

;listen = /var/run/php5-fpm.sock
listen =

listen.owner = www-data = www-data
listen.mode = 0660

Also because they are two different servers after the config changes we must restart:

For fpm config restart:

sudo service restart php5-fpm

For nginx config restart:

sudo service restart nginx