title: "Primary script unknown" PHP
body: <p>I am trying to use PHP in my machine. I have nginx server running few other servers along.</p>
  
  <p>Due to curiosity on how to use PHP , i tried to install php-cli and php5-fpm.</p>
  
  <p>The nginx file below seems to work , however on front-end i get the error " 404". When i checked the error log , i found the error </p>
  
  <pre><code>"2016/03/29 14:28:50 [error] 19752#0: *1 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: ::1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "localhost:84"
  </code></pre>
  
  <p>So i am assuming either my php5-fpm configuration is wrong or my nginx config is wrong .</p>
  
  <p>Here is  my nginx configuration file: </p>
  
  <pre><code>server {
  listen 84 default_server;
  listen [::]:84 default_server ipv6only=on;
  root /usr/share/nginx/html;
  index index.html index.htm;
  
  server_name localhost;
  location / {
      index index.php index.html index.htm;
      root /home/sijan/personal/php_site;
  }
  location ~ \.php$ {
      try_files $uri =404;
      fastcgi_split_path_info ^(.+\.php)(/.+)$;
      fastcgi_pass unix:/var/run/php5-fpm.sock;
      fastcgi_index index.php;
      fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
      include fastcgi_params;
      #fastcgi_split_path_info ^(.+\.php)(/.+)$;
      #fastcgi_pass unix:/var/run/php5-fpm.sock;
      #fastcgi_index index.php;
      #include fastcgi_params;
      }
  }
  </code></pre>
  
  <p>I followed the following <a href="https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04" rel="nofollow">link</a> from Digital Oceans and skip few steps to install MySQL since i will be using psql.</p>
  
  <p>Any Help will be Highly appreciated.</p>