官网解读-fastcgi_param

Syntax:fastcgi_param parameter value [if_not_empty];
Default:
Context:httpserverlocation

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 nofastcgi_param directives defined on the current level.

设置到FastCGI服务的参数,它的值可以是文本,变量或者两者的结合,当且仅当在当前级别没有指定fastcgi-param参数时,这些指令会继承上一级的指令。

The following example shows the minimum required settings for PHP:

fastcgi_param SCRIPT_FILENAME /home/www/scripts/php$fastcgi_script_name;
fastcgi_param QUERY_STRING    $query_string;

 

The SCRIPT_FILENAME parameter is used in PHP for determining the script name, and the QUERY_STRINGparameter is used to pass request parameters.

SCRIPT_FILENAME参数在PHP中用来确定脚本名称,QUERY_STRING参数用来传输请求参数。

For scripts that process POST requests, the following three parameters are also required:

对于处理post请求的脚本来说,接下来的三个参数是需要的。

fastcgi_param REQUEST_METHOD  $request_method;
fastcgi_param CONTENT_TYPE    $content_type;
fastcgi_param CONTENT_LENGTH  $content_length;

 

If PHP was built with the --enable-force-cgi-redirect configuration parameter, the REDIRECT_STATUS parameter should also be passed with the value “200”:

如果PHP编译的时候使用了--enable-force-cgi-redirect 指令,REDIRECT_STATUS参数应该传输200.

fastcgi_param REDIRECT_STATUS 200;

 

If the directive is specified with if_not_empty (1.1.11) then such a parameter will be passed to the server only if its value is not empty:

fastcgi_param HTTPS           $https if_not_empty;
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值