<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <br>
    <div class="moz-cite-prefix">On 09/06/15 14:00, Prameswar Lal wrote:<br>
    </div>
    <blockquote
cite="mid:CACOuzKresZuRhjd1JSOJGGXSB7u-VjXK8Z9Z_hk5jgBkSAvx6w@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>
                <div>
                  <div>
                    <div>Hi , <br>
                    </div>
                     i am sending current access log after changing
                    according to steve block .<br>
                  </div>
                  <br>
                </div>
                Not problem with index.php . it has problem with all
                page of .php in magento tool .<br>
              </div>
              i am using magento tool so this is file of magento . not
              written by me . magento use fastcgi programing in it .<br>
            </div>
            i have tested this magento with apache it works fine. <br>
          </div>
          i have tested on different system centos , ubuntu fresh
          machine. <br>
          <br>
        </div>
        output of curl is .<br>
        root@example:/var/log/nginx# curl  -I <a moz-do-not-send="true"
          href="http://example.com/index.php">http://example.com/index.php</a><br>
        HTTP/1.1 200 OK<br>
        Server: nginx/1.8.0<br>
        Date: Tue, 09 Jun 2015 01:59:02 GMT<br>
        Content-Type: application/octet-stream<br>
        Content-Length: 2642<br>
        Last-Modified: Wed, 14 May 2014 16:03:36 GMT<br>
        Connection: keep-alive<br>
        ETag: "537393d8-a52"<br>
        Accept-Ranges: bytes<br>
        <br>
        <br>
        <br>
         <br>
        <div>
          <div>
            <div>
              <div>
                <div>
                  <div><br>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Tue, Jun 9, 2015 at 7:16 AM,
          Prameswar Lal <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:prameswar.lal@bizruntime.com" target="_blank">prameswar.lal@bizruntime.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">
              <div>Hi steve , <br>
              </div>
              i have checked with your setting also . its not working .<br>
              <br>
            </div>
            <div class="gmail_extra"><br>
              <div class="gmail_quote">
                <div>
                  <div class="h5">On Tue, Jun 9, 2015 at 5:52 AM, steve
                    <span dir="ltr"><<a moz-do-not-send="true"
                        href="mailto:steve@greengecko.co.nz"
                        target="_blank">steve@greengecko.co.nz</a>></span>
                    wrote:<br>
                  </div>
                </div>
                <blockquote class="gmail_quote" style="margin:0 0 0
                  .8ex;border-left:1px #ccc solid;padding-left:1ex">
                  <div>
                    <div class="h5">
                      <div bgcolor="#FFFFFF" text="#000000"> Hi, <br>
                        <div>
                          <div> <br>
                            <div>On 09/06/15 01:34, Prameswar Lal wrote:<br>
                            </div>
                            <blockquote type="cite">
                              <div dir="ltr">
                                <div>hi i am using nginx with magento
                                  which use fastCGI . <br>
                                  whenever i type in url <a
                                    moz-do-not-send="true"
                                    href="http://example.com/index.php"
                                    target="_blank">http://example.com/index.php</a>
                                  then index.php start downloading . <br>
                                  can anyone help me  ?<br>
                                  <br>
                                </div>
                              </div>
                              <fieldset></fieldset>
                            </blockquote>
                          </div>
                        </div>
                        <p style="margin-bottom:0cm"> location ~ \.php$
                          {</p>
                        <pre>    fastcqi_index index.php;
    fastcgi_pass   <a moz-do-not-send="true" href="http://127.0.0.1:9000" target="_blank">127.0.0.1:9000</a>;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    include fastcgi_params;
    fastcgi_intercept_errors on;
    # By all means use a different server for the fcgi processes if you need to
    
   fastcgi_split_path_info ^(.+.php)(.*)$;
    
  }

You have 2 fastcgi_pass lines, one to <a moz-do-not-send="true" href="http://127.0.0.1:9000" target="_blank">127.0.0.1:9000</a> and one to unix:/var/run/php5-fpm.sock

Only one of these should be there, the correct one will be defined in your php-fpm configuration, which isn't shown.


I use a backend predefined in nginx.conf to identify the php-fpm pool to use. The 2 relevant location blocks in a base install of mine...


        location / {
                try_files $uri $uri/ /index.php?$args;
        }
        
        location ~ \.php$ {
                try_files $uri =404;
        
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
        
                include fastcgi_params;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_pass backend;
        }


which will work with just about every PHP based CMS out there... well enough to get you started....


Steve
</pre>
                        <span><font color="#888888">
                            <pre cols="72">-- 
Steve Holdoway BSc(Hons) MIITP
<a moz-do-not-send="true" href="http://www.greengecko.co.nz" target="_blank">http://www.greengecko.co.nz</a>
Linkedin: <a moz-do-not-send="true" href="http://www.linkedin.com/in/steveholdoway" target="_blank">http://www.linkedin.com/in/steveholdoway</a>
Skype: sholdowa</pre>
                          </font></span></div>
                      <br>
                    </div>
                  </div>
                  <span class="">_______________________________________________<br>
                    nginx mailing list<br>
                    <a moz-do-not-send="true"
                      href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
                    <a moz-do-not-send="true"
                      href="http://mailman.nginx.org/mailman/listinfo/nginx"
                      target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
                  </span></blockquote>
              </div>
              <br>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
nginx mailing list
<a class="moz-txt-link-abbreviated" href="mailto:nginx@nginx.org">nginx@nginx.org</a>
<a class="moz-txt-link-freetext" href="http://mailman.nginx.org/mailman/listinfo/nginx">http://mailman.nginx.org/mailman/listinfo/nginx</a></pre>
    </blockquote>
    That confirms that you're not attempting to process your php. Try
    removing all host config files apart from this one ( in cond.f and
    sites-enabled )<br>
    <pre class="moz-signature" cols="72">-- 
Steve Holdoway BSc(Hons) MIITP
<a class="moz-txt-link-freetext" href="http://www.greengecko.co.nz">http://www.greengecko.co.nz</a>
Linkedin: <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/steveholdoway">http://www.linkedin.com/in/steveholdoway</a>
Skype: sholdowa</pre>
  </body>
</html>