nginx para php

nginx 有 两种 方式 FastCGI 实现 php, 第 一种 是 unix 的 stock, 另 一种 则 是 通过 ip 和 端口 实现.

debian7.1
/etc/php5/fpm/pool.d/ www.conf

; The address on which to accept FastCGI requests.
; Valid syntaxes are:
; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
; a specific port;
; 'port' - to listen on a TCP socket to all addresses on a
; specific port;
; '/path/to/unix/socket' - to listen on a unix socket.
; Note: This value is mandatory.
; listen = /var/run/php5-fpm.sock
listen
= 127.0.0.1:9000

/ etc / nginx / sites-available / default

#fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index
.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name
;
#fastcgi_param SCRIPT_FILENAME /opt/www/$fastcgi_script_name;
include fastcgi_params
;