#} fastcgi模块的常用指令:
fastcgi_pass
指定fastcgi服务监听端口、地址、也支持使用 Uxin socket ngx_http_fastcgi_module
Syntax:fastcgi_passaddress;Default:—Context:location, if in location Sets the address of a FastCGI server. The address can be specified as a domain name or IP address, and a port:
fastcgi_pass localhost:9000;
or as a UNIX-domain socket path:
fastcgi_pass unix:/tmp/fastcgi.socket;
fastcgi_param
定义传递给fpm的参数
Syntax:fastcgi_paramparametervalue [if_not_empty];Default:—Context:http, server, location Sets a parameter that should be passed to the FastCGI server. The value can contain text, variables, and their combination. These directives are inherited from the previous level if and only if there are no fastcgi_param directives defined on the current level.
The following example shows the minimum required settings for PHP:
fastcgi模块常用的指令:
fastcgi_pass:指定fastcgi服务监听端口、地址、也支持使用 Uxin socket
fastcgi_bind:指定练习fpm服务时使用的地址
fastcgi_param:定义传递给fpm的参数
fastcgi_index:php的主页面文件
php-fpm的结果也是可以缓存的,缓存空间使用proxy_cache_path定义,使用fastcg_cache定义
fastcgi_cache_path
fastcgi_cache
fastcgi_cache_vaild
fastcgi_connect_timeout:连接fastcgi服务器的超时时长
fastcgi_send_timeout:向fastcgi服务器传输数据的超时时长
用法和proxy模块上的相应指令一样,不再重复 Embedded Variables
The ngx_http_fastcgi_module module supports embedded variables that can be used to set parameters using the fastcgi_param directive: $fastcgi_script_name
保存了请求报文中的uri
For example, for the “/info/” request with the following directives
the SCRIPT_FILENAME parameter will be equal to“/home/www/scripts/php/info/index.php”
# 如果前面没有使用root指令fastcgi服务器上的根目录,这里就要使用绝对路径 三、获取php-fpm的状态的状态信息
server {
root /www/c.net;