Welcome! Log In Create A New Profile

Advanced

Re: problem : nginx with magento

All files from this thread

File Name File Size   Posted by Date  
example.com.conf 860 bytes open | download prameswar 06/08/2015 Read message
fastcgi.conf 1 KB open | download prameswar 06/08/2015 Read message
fastcgi_params 964 bytes open | download prameswar 06/08/2015 Read message
nginx.conf 1.4 KB open | download prameswar 06/08/2015 Read message
access.log 1.6 KB open | download prameswar 06/08/2015 Read message
error.log 111 bytes open | download prameswar 06/08/2015 Read message
error.log 666 bytes open | download prameswar 06/09/2015 Read message
nginx.conf 1 KB open | download prameswar 06/09/2015 Read message
June 08, 2015 08:24PM
Hi,

On 09/06/15 01:34, Prameswar Lal wrote:
> hi i am using nginx with magento which use fastCGI .
> whenever i type in url http://example.com/index.php then index.php
> start downloading .
> can anyone help me ?
>
location ~ \.php$ {

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

--
Steve Holdoway BSc(Hons) MIITP
http://www.greengecko.co.nz
Linkedin: http://www.linkedin.com/in/steveholdoway
Skype: sholdowa

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

problem : nginx with magento Attachments

prameswar June 08, 2015 09:36AM

Re: problem : nginx with magento

Anoop Alias June 08, 2015 09:44AM

Re: problem : nginx with magento

prameswar June 08, 2015 09:48AM

Re: problem : nginx with magento

Francis Daly June 08, 2015 06:54PM

Re: problem : nginx with magento

GreenGecko June 08, 2015 08:24PM

Re: problem : nginx with magento

prameswar June 08, 2015 09:48PM

Re: problem : nginx with magento Attachments

prameswar June 08, 2015 10:02PM

Re: problem : nginx with magento

GreenGecko June 08, 2015 10:12PM

Re: problem : nginx with magento

Francis Daly June 09, 2015 03:46AM

Re: problem : nginx with magento Attachments

prameswar June 09, 2015 07:48AM

Re: problem : nginx with magento

GreenGecko June 09, 2015 05:26PM

Re: problem : nginx with magento

GreenGecko June 08, 2015 10:04PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 144
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready