Home >Backend Development >PHP Tutorial >Nginx: fastcgi_param detailed explanation

Nginx: fastcgi_param detailed explanation

WBOY
WBOYOriginal
2016-07-29 09:00:442322browse

<code>fastcgi_param  SCRIPT_FILENAME    <span>$document_root</span><span>$fastcgi_script_name</span>;<span>#脚本文件请求的路径</span>
fastcgi_param  QUERY_STRING       <span>$query_string</span>; <span>#请求的参数;如?app=123</span>
fastcgi_param  REQUEST_METHOD     <span>$request_method</span>; <span>#请求的动作(GET,POST)</span>
fastcgi_param  CONTENT_TYPE       <span>$content_type</span>; <span>#请求头中的Content-Type字段</span>
fastcgi_param  CONTENT_LENGTH     <span>$content_length</span>; <span>#请求头中的Content-length字段。</span>fastcgi_param  SCRIPT_NAME        <span>$fastcgi_script_name</span>; <span>#脚本名称 </span>
fastcgi_param  REQUEST_URI        <span>$request_uri</span>; <span>#请求的地址不带参数</span>
fastcgi_param  DOCUMENT_URI       <span>$document_uri</span>; <span>#与$uri相同。 </span>
fastcgi_param  DOCUMENT_ROOT      <span>$document_root</span>; <span>#网站的根目录。在server配置中root指令中指定的值 </span>
fastcgi_param  SERVER_PROTOCOL    <span>$server_protocol</span>; <span>#请求使用的协议,通常是HTTP/1.0或HTTP/1.1。  </span>fastcgi_param  GATEWAY_INTERFACE  CGI/<span>1.1</span>;<span>#cgi 版本</span>
fastcgi_param  SERVER_SOFTWARE    nginx/<span>$nginx_version</span>;<span>#nginx 版本号,可修改、隐藏</span>fastcgi_param  REMOTE_ADDR        <span>$remote_addr</span>; <span>#客户端IP</span>
fastcgi_param  REMOTE_PORT        <span>$remote_port</span>; <span>#客户端端口</span>
fastcgi_param  SERVER_ADDR        <span>$server_addr</span>; <span>#服务器IP地址</span>
fastcgi_param  SERVER_PORT        <span>$server_port</span>; <span>#服务器端口</span>
fastcgi_param  SERVER_NAME        <span>$server_name</span>; <span>#服务器名,域名在server配置中指定的server_name</span><span>#fastcgi_param  PATH_INFO           $path_info;#可自定义变量</span><span># PHP only, required if PHP was built with --enable-force-cgi-redirect</span><span>#fastcgi_param  REDIRECT_STATUS    200;</span>在php可打印出上面的服务环境变量
如:<span>echo</span><span>$_SERVER</span>[<span>'REMOTE_ADDR'</span>]</code>
').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above introduces the detailed explanation of Nginx:fastcgi_param, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn