title: configuring codeigniter on nginx
body: <p>I have my codeigniter code and I have setup nginx server on localhost. But codeigniter code doesn't show up. Shows 404  not found error for all pages.
  I googled around and came to know that editing /etc/nginx/sites-available/default was the key.</p>
  
  <p>Here is the code I added after googling to the file, please tell me where am I wrong and what else needs to be added. I am a complete newbie to editing such files. My code for the project is in 'usr/share/nginx/html/krshop'.
  Thanxx!!</p>
  
  <pre><code>server {
  server_name localhost;
  root /usr/share/nginx/html/;
  index index.php index.html index.htm;
  location / {
      try_files $uri $uri/ /index.php;
  }
  
  location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
      expires           15d;
  }
  
  location ~ \.php$ {
      include /etc/nginx/fastcgi_params;
      fastcgi_index  index.php;
      fastcgi_param  SCRIPT_FILENAME  /usr/share/nginx/html/index.php;
      fastcgi_param  REQUEST_URI      $request_uri;
      fastcgi_param  QUERY_STRING     $query_string;
      fastcgi_param  REQUEST_METHOD   $request_method;
      fastcgi_param  CONTENT_TYPE     $content_type;
      fastcgi_param  CONTENT_LENGTH   $content_length;
      fastcgi_pass   unix:/var/run/php5-fpm.sock;
   }
  }
  </code></pre>