title: codeigniter not working in nginx(running on localhost), linux mint
body: <p>I have installed LEMP on my linux mint system.
  nginx is configured to work with php5-fpm sockets.
  When I run codeigniter in my system index.php(link: localhost/ci/index.php) shows up, but when I try to open any of controller, say blog(link localhost/ci/index.php/blog) nginx gives <strong>404 error</strong> message.</p>
  
  <p>Following is my nginx configuration placed in file /etc/nginx/sites-avaliable/default</p>
  
  <pre><code>server {
  listen 127.0.0.1:80;
  listen [::]:80 default_server ipv6only=on;
  root /home/scoders/Workspace/public_html;
  index index.html index.htm index.php;
  autoindex on;
  
  server_name localhost;
  
  location / {
      try_files $uri $uri/ /index.php?$args;
  }
  
  # Only for nginx-naxsi used with nginx-naxsi-ui : process denied requests
  
  location ~ \.php$ {
      fastcgi_split_path_info ^(.+\.php)(.*)$;
      fastcgi_param REQUEST_URI $request_uri;
      fastcgi_pass unix:/var/run/php5-fpm.sock;
      fastcgi_index index.php;
      fastcgi_param SCRIPT_FILENAME /home/scoders/Workspace/public_html/ci/index.php;
      #fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
      include fastcgi_params;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Contents of nginx.conf are as follows:</p>
  
  <pre><code>user scoders;
  worker_processes 4;
  pid /run/nginx.pid;
  
  events {
      worker_connections 768;
  }
  http {
      sendfile on;
      tcp_nopush on;
      tcp_nodelay on;
      keepalive_timeout 65;
      types_hash_max_size 2048;
  
      include /etc/nginx/mime.types;
      default_type application/octet-stream;
  
      access_log /var/log/nginx/access.log;
      error_log /var/log/nginx/error.log;
  
      gzip on;
      gzip_disable "msie6";
  
      xml+rss text/javascript;
  
      include /etc/nginx/conf.d/*.conf;
      include /etc/nginx/sites-enabled/*;
      include /etc/nginx/sites-enabled/*.conf;
      server_names_hash_bucket_size 64;
  }
  </code></pre>
  
  <p>My log gives following error:</p>
  
  <pre><code>    2016/03/14 14:38:38 [error] 23239#0: *1 FastCGI sent in stderr: 
  "Primary script unknown" while reading response header from upstream, 
  client: 127.0.0.1, server: localhost, request: "GET /ci/index.php/ci 
  HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "localhost"
  </code></pre>
  
  <p>I have tried  these links but no luck:</p>
  
  <p><a href="https://www.nginx.com/resources/wiki/start/topics/recipes/codeigniter/" rel="nofollow">Codeigniter | NGINX</a></p>
  
  <p><a href="http://www.farinspace.com/codeigniter-nginx-rewrite-rules/" rel="nofollow">CodeIgniter NGINX Rewrite Rules</a></p>