server {
      server_name www.slinex.local;
      rewrite ^/(.*) http://slinex.local/ permanent;
}

server {
        listen   80;
        server_name  slinex.local;

        access_log  /var/log/nginx/slinex.local.access.log;
        error_log   /var/log/nginx/slinex.local.error.log;

        root   /var/www/slinex/www;
        index index.php;

        location / {
            try_files $uri $uri/ /index.php?kohana_uri=$uri&$args;
        }

        location ~ \.php$ {
            try_files $uri =404;
            #fastcgi_pass   127.0.0.1:9005;
            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            include fastcgi_params;
        }
}
