( 1 ) Settings IP
Nginx Server: 192.168.1.10 nginx1.6.2
PHP Server: 192.168.1.11 php5.3.29
( 2 ) installed. Nginx and the PHP , where Nginx Services and PHP-FPM Service Open normally
( 3 the configuration file is very important to write, the Novice's big Pit, as follows:
Location ~ \.php$ {
root HTML;
Fastcgi_pass 192.168.1.11:9000;
Fastcgi_index index.php;
Fastcgi_param script_filename/application/nginx/html/$fastcgi _script_name;
Include Fastcgi_params;
}
Fastcgi_param script_filename/application/nginx/html/$fastcgi _script_name;
/application/nginx/html/ this path should not be thought of as nginx php server directory, this directory is to be established in Span style= "FONT-FAMILY:CALIBRI;" >php server, then put .php Span style= "Font-family:simsun;" > Put the file into the nginx file not found nginx
remove this line of comments listen.allowed_clients =, fill in Nginx Server's IP
listen.allowed_clients= 192.168.1.10
Remove the comment that listens there and change it to:
; Note:this Valueis Mandatory.
listen= 192.168.1.11:9000
Restart PHP-FPM , and then in PHP site root directory on the server /application/nginx/html/ put phpinfo.php , you can open it successfully phpinfo.php up.
This article is from the "biohazard2k" blog, make sure to keep this source http://biohazard2k.blog.51cto.com/68212/1617753
Nginx Server and PHP server distributed deployment