About fastcgi_param in nginx

Source: Internet
Author: User

Fastcgi_param

Syntax: fastcgi_param parameter valuedefault: nonecontext: http, server, location the parameter specified by this command will be passed to FastCGI-server. It may use strings, variables, and their combinations as parameter values. If a parameter is not set here, It inherits the outer settings. If a parameter is set here, the outer settings are cleared and only the current layer settings are enabled. The following is an example of the simplest and necessary parameter 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 by PHP to determine the script execution name, And the QUERY_STRING parameter is a subparameter. To process POST, these three additional parameters are necessary: fastcgi_param REQUEST_METHOD $ request_method; fastcgi_param CONTENT_TYPE $ content_type; fastcgi_param CONTENT_LENGTH $ content_length; if PHP uses the -- enable-force-cgi-redirect option during compilation, setting the REDIRECT_STATUS parameter to 200 is required. Fastcgi_param REDIRECT_STATUS 200;


This article from the "notepad" blog, please be sure to keep this source http://sndapk.blog.51cto.com/5385144/1298738

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.