<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<meta http-equiv="CONTENT-TYPE" content="text/html;
charset=windows-1252">
Hi,
<title></title>
<meta name="GENERATOR" content="LibreOffice 4.0.4.2 (Linux)">
<style type="text/css">
<!--
@page { margin: 2cm }
PRE.cjk { font-family: "AR PL UMing HK", monospace }
PRE.ctl { font-family: "Lohit Devanagari", monospace }
P { margin-bottom: 0.21cm }
-->
</style><br>
<br>
<div class="moz-cite-prefix">On 09/06/15 01:34, Prameswar Lal wrote:<br>
</div>
<blockquote
cite="mid:CACOuzKoJutE6fCwqyTbakZpto7r01azBxu8aqayY+1+v5p9bBA@mail.gmail.com"
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">http://example.com/index.php</a>
then index.php start downloading . <br>
can anyone help me ?<br>
<br>
</div>
</div>
<fieldset class="mimeAttachmentHeader"></fieldset>
</blockquote>
<meta http-equiv="CONTENT-TYPE" content="text/html;
charset=windows-1252">
<p style="margin-bottom: 0cm"> location ~ \.php$ {</p>
<pre class="western"> fastcqi_index index.php;
fastcgi_pass 127.0.0.1:9000;
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 127.0.0.1:9000 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>
<title></title>
<meta name="GENERATOR" content="LibreOffice 4.0.4.2 (Linux)">
<style type="text/css">
<!--
@page { margin: 2cm }
PRE.cjk { font-family: "AR PL UMing HK", monospace }
PRE.ctl { font-family: "Lohit Devanagari", monospace }
P { margin-bottom: 0.21cm }
-->
</style>
<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>