scgi_store

Syntax: scgi_store on | off | string; Default: scgi_store off; Context: http, server, location Enables saving of files to a disk. The on parameter saves files with paths corresponding to the directives alias or root. The off parameter disables saving of files. In addition, the file name can be set explicitly using the string with variables: scgi_store /data/www$original_uri; The modification time of files is set according to the received “Last-Modified” response he

listen

Syntax: listen address[:port] [default_server] [ssl] [http2 | spdy] [proxy_protocol] [setfib=number] [fastopen=number] [backlog=number] [rcvbuf=size] [sndbuf=size] [accept_filter=filter] [deferred] [bind] [ipv6only=on|off] [reuseport] [so_keepalive=on|off|[keepidle]:[keepintvl]:[keepcnt]];listen port [default_server] [ssl] [http2 | spdy] [proxy_protocol] [setfib=number] [fastopen=number] [backlo

uwsgi_limit_rate

Syntax: uwsgi_limit_rate rate; Default: uwsgi_limit_rate 0; Context: http, server, location This directive appeared in version 1.7.7. Limits the speed of reading the response from the uwsgi server. The rate is specified in bytes per second. The zero value disables rate limiting. The limit is set per a request, and so if nginx simultaneously opens two connections to the uwsgi server, the overall rate will be twice as much as the specified limit. The limitation works only if bufferi

proxy_ssl_certificate

Syntax: proxy_ssl_certificate file; Default: — Context: stream, server Specifies a file with the certificate in the PEM format used for authentication to a proxied server.

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_send_lowat

Syntax: fastcgi_send_lowat size; Default: fastcgi_send_lowat 0; Context: http, server, location If the directive is set to a non-zero value, nginx will try to minimize the number of send operations on outgoing connections to a FastCGI server by using either NOTE_LOWAT flag of the kqueue method, or the SO_SNDLOWAT socket option, with the specified size. This directive is ignored on Linux, Solaris, and Windows.

fastcgi_next_upstream

Syntax: fastcgi_next_upstream error | timeout | invalid_header | http_500 | http_503 | http_403 | http_404 | non_idempotent | off ...; Default: fastcgi_next_upstream error timeout; Context: http, server, location Specifies in which cases a request should be passed to the next server: error an error occurred while establishing a connection with the server, passing a request to it, or reading the response header; timeout a timeout has occurre

fastcgi_cache_bypass

Syntax: fastcgi_cache_bypass string ...; Default: — Context: http, server, location Defines conditions under which the response will not be taken from a cache. If at least one value of the string parameters is not empty and is not equal to “0” then the response will not be taken from the cache: fastcgi_cache_bypass $cookie_nocache $arg_nocache$arg_comment; fastcgi_cache_bypass $http_pragma $http_authorization; Can be used along with the fastcgi_no_cache directive.

proxy_buffering

Syntax: proxy_buffering on | off; Default: proxy_buffering on; Context: http, server, location Enables or disables buffering of responses from the proxied server. When buffering is enabled, nginx receives a response from the proxied server as soon as possible, saving it into the buffers set by the proxy_buffer_size and proxy_buffers directives. If the whole response does not fit into memory, a part of it can be saved to a temporary file on the disk. Writing to temporary files is

Controlling nginx

Controlling nginx Changing Configuration Rotating Log-files Upgrading Executable on the Fly nginx can be controlled with signals. The process ID of the master process is written to the file /usr/local/nginx/logs/nginx.pid by default. This name may be changed at configuration time, or in nginx.conf using the pid directive. The master process supports the following signals: TERM, INT fast shutdown QUIT graceful shutdown HUP changing configuration, keeping up with a changed time zone (only for