unix:/tmp/php-cgi.sock
和127.0.0.1:9000
二者有什么区别呢?
我在我的php-fpm.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 = 127.0.0.1:9000
$fastcgi_script_name
这个变量等于一个以斜线结尾的请求URI加上fastcgi_index给定的参数。可以用这个变量代替SCRIPT_FILENAME 和PATH_TRANSLATED,以确定php脚本的名称。 如下例,请求”/info/”:
fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /home/www/scripts/php$fastcgi_script_name;SCRIPT_FILENAME等于”/home/www/scripts/php/info/index.php”。