fastcgi_index

Syntax: fastcgi_index name; Default: — Context: http, server, location Sets a file name that will be appended after a URI that ends with a slash, in the value of the $fastcgi_script_name variable. For example, with these settings fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /home/www/scripts/php$fastcgi_script_name; and the “/page.php” request, the SCRIPT_FILENAME parameter will be equal to “/home/www/scripts/php/page.php”, and with the “/” request it will be equal to

fastcgi_ignore_headers

Syntax: fastcgi_ignore_headers field ...; Default: — Context: http, server, location Disables processing of certain response header fields from the FastCGI server. The following fields can be ignored: “X-Accel-Redirect”, “X-Accel-Expires”, “X-Accel-Limit-Rate” (1.1.6), “X-Accel-Buffering” (1.1.6), “X-Accel-Charset” (1.1.6), “Expires”, “Cache-Control”, “Set-Cookie” (0.8.44), and “Vary” (1.7.7). If not disabled, processing of these header fields has the following effect: “X-Accel

fastcgi_ignore_client_abort

Syntax: fastcgi_ignore_client_abort on | off; Default: fastcgi_ignore_client_abort off; Context: http, server, location Determines whether the connection with a FastCGI server should be closed when a client closes the connection without waiting for a response.

fastcgi_hide_header

Syntax: fastcgi_hide_header field; Default: — Context: http, server, location By default, nginx does not pass the header fields “Status” and “X-Accel-...” from the response of a FastCGI server to a client. The fastcgi_hide_header directive sets additional fields that will not be passed. If, on the contrary, the passing of fields needs to be permitted, the fastcgi_pass_header directive can be used.

fastcgi_force_ranges

Syntax: fastcgi_force_ranges on | off; Default: fastcgi_force_ranges off; Context: http, server, location This directive appeared in version 1.7.7. Enables byte-range support for both cached and uncached responses from the FastCGI server regardless of the “Accept-Ranges” field in these responses.

fastcgi_connect_timeout

Syntax: fastcgi_connect_timeout time; Default: fastcgi_connect_timeout 60s; Context: http, server, location Defines a timeout for establishing a connection with a FastCGI server. It should be noted that this timeout cannot usually exceed 75 seconds.

fastcgi_catch_stderr

Syntax: fastcgi_catch_stderr string; Default: — Context: http, server, location Sets a string to search for in the error stream of a response received from a FastCGI server. If the string is found then it is considered that the FastCGI server has returned an invalid response. This allows handling application errors in nginx, for example: location /php { fastcgi_pass backend:9000; ... fastcgi_catch_stderr "PHP Fatal error"; fastcgi_next_upstream error timeout inval

fastcgi_cache_valid

Syntax: fastcgi_cache_valid [code ...] time; Default: — Context: http, server, location Sets caching time for different response codes. For example, the following directives fastcgi_cache_valid 200 302 10m; fastcgi_cache_valid 404 1m; set 10 minutes of caching for responses with codes 200 and 302 and 1 minute for responses with code 404. If only caching time is specified fastcgi_cache_valid 5m; then only 200, 301, and 302 responses are cached. In addition, the any

fastcgi_cache_use_stale

Syntax: fastcgi_cache_use_stale error | timeout | invalid_header | updating | http_500 | http_503 | http_403 | http_404 | off ...; Default: fastcgi_cache_use_stale off; Context: http, server, location Determines in which cases a stale cached response can be used when an error occurs during communication with the FastCGI server. The directive’s parameters match the parameters of the fastcgi_next_upstream directive. The error parameter also

fastcgi_cache_revalidate

Syntax: fastcgi_cache_revalidate on | off; Default: fastcgi_cache_revalidate off; Context: http, server, location This directive appeared in version 1.5.7. Enables revalidation of expired cache items using conditional requests with the “If-Modified-Since” and “If-None-Match” header fields.