Javatpoint Logo
Javatpoint Logo

List of Directives

Nginx consists of modules which are controlled by directives defined in the configuration file. Directives are divided into two parts:

  • Simple Directive: A simple directive made up of the name and parameters separated by spaces and ends with a semicolon (;).
  • Block Directive: The structure of block directive is similar to simple directive, but instead of semicolon it ends with a set of additional instructions surrounded by curly braces ({ and }). If a block directive can have other directives inside the braces, then it is known as context. Eg. Events, http, location and server.

Directives which are placed in the configuration file outside of any contexts are considered to be in the main context. The events and http directives reside in the main context, server resides in http and location resides in server.

Let's see the list of directives:

absolute_redirect absolute_redirect on | off; absolute_redirect on; http, server, location
accept_mutex accept_mutex on | off; off Events
accept_mutex_delay accept_mutex_delay time; accept_mutex_delay 500ms; Events
access_log (ngx_http_log_module) access_log path [format [buffer=size] [gzip[=level]] [flush=time] [if=condition]]; access_log off; access_log logs/access.log combined; http, server, location, if in location, limit_except
access_log (ngx_stream_log_module) access_log path format [buffer=size] [gzip[=level]] [flush=time] [if=condition]; access_log off; access_log off; stream, server
add_after_body add_before_body uri; - http, server, location
add_before_body add_before_body uri; - http, server, location
add_header add_header name value [always]; - http, server, location, if in location
add_trailer add_trailer name value [always]; - http, server, location, if in location
addition_types addition_types mime-type ...; addition_types text/html; http, server, location
Aio aio on | off | threads[=pool]; aio off; http, server, location
aio_write aio_write on | off; aio_write off; http, server, location
Alias alias path; - Location
allow (ngx_http_access_module) allow address | CIDR | unix: | all; - http, server, location, limit_except
allow (ngx_stream_access_module) allow address | CIDR | unix: | all; - Stream, server
ancient_browser ancient_browser string ...; - http, server, location
ancient_browser_value ancient_browser_value string; ancient_browser_value 1; http, server, location
Api api [write=on|off]; - location
auth_basic auth_basic string | off; auth_basic off; http, server, location, limit_except
auth_basic_user_file auth_basic_user_file file; - http, server, location, limit_except
auth_http auth_http URL; - mail, server
auth_http_header auth_http_header header value; - mail, server
auth_http_pass_client_cert auth_http_pass_client_cert on | off; auth_http_pass_client_cert off; mail, server
auth_http_timeout auth_http_timeout time; auth_http_timeout 60s; mail, server
auth_jwt auth_jwt string [token=$variable] | off; auth_jwt off; http, server, location, limit_except
auth_jwt_claim_set auth_jwt_claim_set $variable name ...; - http
auth_jwt_header_set auth_jwt_header_set $variable name ...; - http
auth_jwt_key_file auth_jwt_key_file file; - ttp, server, location, limit_except
auth_jwt_key_request auth_jwt_key_request uri; - http, server, location, limit_except
auth_jwt_leeway auth_jwt_leeway time; auth_jwt_leeway 0s; http, server, location
auth_request auth_request uri | off; auth_request off; http, server, location
auth_request_set auth_request uri | off; auth_request off; http, server, location
Autoindex autoindex on | off; autoindex off; http, server, location
autoindex_exact_size autoindex_exact_size on | off; autoindex_exact_size on; http, server, location
autoindex_format autoindex_format html | xml | json | jsonp; autoindex_format html; http, server, location
autoindex_localtime autoindex_localtime on | off; autoindex_localtime off; http, server, location
Break break; - server, location, if
charset charset charset | off; charset off; http, server, location, if in location
charset_map charset_map charset1 charset2 { ... } - Http
charset_types charset_types mime-type ...; charset_types text/html text/xml text/plain text/vnd.wap.wml application/javascript application/rss+xml; http, server, location
chunked_transfer_encoding chunked_transfer_encoding on | off; chunked_transfer_encoding on; http, server, location
client_body_buffer_size client_body_buffer_size size; client_body_buffer_size 8k|16k; http, server, location
client_body_in_file_only client_body_in_file_only on | clean | off; client_body_in_file_only off; http, server, location
client_body_in_single_buffer client_body_in_single_buffer on | off; client_body_in_single_buffer off; http, server, location
client_body_temp_path client_body_temp_path path [level1 [level2 [level3]]]; client_body_temp_path client_body_temp; http, server, location
client_body_timeout client_body_timeout time; client_body_timeout 60s; http, server, location
client_header_buffer_size client_header_buffer_size size; client_header_buffer_size 1k; http, server
client_header_timeout client_header_timeout time; client_header_timeout 60s; http, server
client_max_body_size client_max_body_size size; client_max_body_size 1m; http, server, location
connection_pool_size connection_pool_size size; connection_pool_size 256|512; http, server
create_full_put_path create_full_put_path on | off; create_full_put_path off; http, server, location
Daemon daemon on | off; daemon on; Main
dav_access dav_access users:permissions ...; dav_access user:rw; http, server, location
dav_methods dav_methods off | method ...; dav_methods off; http, server, location
debug_connection debug_connection address | CIDR | unix:; - Events
debug_points debug_points abort | stop; - Main
default_type default_type mime-type; default_type text/plain; http, server, location
deny (ngx_http_access_module) deny address | CIDR | unix: | all; - http, server, location, limit_except
deny (ngx_stream_access_module) deny address | CIDR | unix: | all; - stream, server
Directio directio size | off; directio off; http, server, location
directio_alignment directio_alignment size; directio_alignment 512; http, server, location
disable_symlinks disable_symlinks off; disable_symlinks on | if_not_owner [from=part]; disable_symlinks off; http, server, location
empty_gif empty_gif; - Location
Env env variable[=value]; env TZ; Main
error_log error_log file [level]; error_log logs/error.log error; main, http, mail, stream, server, location
error_page error_page code ... [=[response]] uri; - http, server, location, if in location
Etag etag on | off; etag on; http, server, location
Events events { ... } - Main
Expires expires [modified] time; expires epoch | max | off; expires off; http, server, location, if in location
f4f f4f; - Location
f4f_buffer_size f4f_buffer_size size; f4f_buffer_size 512k; http, server, location
fastcgi_bind fastcgi_bind address [transparent] | off; - http, server, location
fastcgi_buffer_size fastcgi_buffer_size size; fastcgi_buffer_size 4k|8k; http, server, location
fastcgi_buffering fastcgi_buffering on | off; fastcgi_buffering on; http, server, location
fastcgi_buffers fastcgi_buffers number size; fastcgi_buffers 8 4k|8k; http, server, location
fastcgi_busy_buffers_size fastcgi_busy_buffers_size size; fastcgi_busy_buffers_size 8k|16k; http, server, location
fastcgi_cache fastcgi_cache zone | off; fastcgi_cache off; http, server, location
fastcgi_cache_background_update fastcgi_cache_background_update on | off; fastcgi_cache_background_update off; http, server, location
fastcgi_cache_bypass fastcgi_cache_bypass string ...; - http, server, location
fastcgi_cache_key fastcgi_cache_key string; - http, server, location
fastcgi_cache_lock fastcgi_cache_lock on | off; fastcgi_cache_lock off; http, server, location
fastcgi_cache_lock_age fastcgi_cache_lock_age time; fastcgi_cache_lock_age 5s; http, server, location
fastcgi_cache_lock_timeout fastcgi_cache_lock_timeout time; fastcgi_cache_lock_timeout 5s; http, server, location
fastcgi_cache_max_range_offset fastcgi_cache_max_range_offset number; - http, server, location
fastcgi_cache_methods fastcgi_cache_methods GET | HEAD | POST ...; fastcgi_cache_methods GET HEAD; http, server, location
fastcgi_cache_min_uses fastcgi_cache_min_uses number; fastcgi_cache_min_uses 1; http, server, location
fastcgi_cache_path fastcgi_cache_path path [levels=levels] [use_temp_path=on|off] keys_zone=name:size [inactive=time] [max_size=size] [manager_files=number] [manager_sleep=time] [manager_threshold=time] [loader_files=number] [loader_sleep=time] [loader_threshold=time] [purger=on|off] [purger_files=number] [purger_sleep=time] [purger_threshold=time]; - http
fastcgi_cache_purge fastcgi_cache_purge string ...; - http, server, location
fastcgi_cache_revalidate fastcgi_cache_revalidate on | off; fastcgi_cache_revalidate off; http, server, location
fastcgi_cache_use_stale fastcgi_cache_use_stale error | timeout | invalid_header | updating | http_500 | http_503 | http_403 | http_404 | http_429 | off ...; fastcgi_cache_use_stale off; http, server, location
fastcgi_cache_valid fastcgi_cache_valid [code ...] time; - http, server, location
fastcgi_catch_stderr fastcgi_catch_stderr string; - http, server, location
fastcgi_connect_timeout fastcgi_connect_timeout time; - http, server, location
fastcgi_force_ranges fastcgi_force_ranges on | off; fastcgi_force_ranges off; http, server, location
fastcgi_hide_header fastcgi_hide_header field; - http, server, location
fastcgi_ignore_client_abort fastcgi_ignore_client_abort on | off; fastcgi_ignore_client_abort off; http, server, location
fastcgi_ignore_headers fastcgi_ignore_headers field ...; - http, server, location
fastcgi_index fastcgi_index name; - http, server, location
fastcgi_intercept_errors fastcgi_intercept_errors on | off; fastcgi_intercept_errors off; http, server, location
fastcgi_keep_conn fastcgi_keep_conn on | off; fastcgi_keep_conn off; http, server, location
fastcgi_limit_rate fastcgi_limit_rate rate; fastcgi_limit_rate 0; http, server, location
fastcgi_max_temp_file_size fastcgi_max_temp_file_size size; fastcgi_max_temp_file_size 1024m; http, server, location
fastcgi_next_upstream fastcgi_next_upstream error | timeout | invalid_header | http_500 | http_503 | http_403 | http_404 | http_429 | non_idempotent | off ...; fastcgi_next_upstream error timeout; http, server, location
fastcgi_next_upstream_timeout fastcgi_next_upstream_timeout time; fastcgi_next_upstream_timeout 0; http, server, location
fastcgi_next_upstream_tries fastcgi_next_upstream_tries number; fastcgi_next_upstream_tries 0; http, server, location
fastcgi_no_cache fastcgi_no_cache string ...; - http, server, location
fastcgi_param fastcgi_param parameter value [if_not_empty]; - http, server, location
fastcgi_pass fastcgi_pass address; - location, if in location
fastcgi_pass_header fastcgi_pass_header field; - http, server, location
fastcgi_pass_request_body fastcgi_pass_request_body on | off; fastcgi_pass_request_body on; http, server, location
fastcgi_pass_request_headers fastcgi_pass_request_headers on | off; fastcgi_pass_request_headers on; http, server, location
fastcgi_read_timeout fastcgi_read_timeout time; fastcgi_read_timeout 60s; http, server, location
fastcgi_request_buffering fastcgi_request_buffering on | off; fastcgi_request_buffering on; http, server, location
fastcgi_send_lowat fastcgi_send_lowat size; fastcgi_send_lowat 0; http, server, location
fastcgi_send_timeout fastcgi_send_timeout time; fastcgi_send_timeout 60s; http, server, location
fastcgi_socket_keepalive fastcgi_socket_keepalive on | off; fastcgi_socket_keepalive off; http, server, location
fastcgi_split_path_info fastcgi_split_path_info regex; - Location
fastcgi_store fastcgi_store on | off | string; fastcgi_store off; http, server, location
fastcgi_store_access fastcgi_store_access users:permissions ...; fastcgi_store_access user:rw; http, server, location
fastcgi_temp_file_write_size fastcgi_temp_file_write_size size; fastcgi_temp_file_write_size 8k|16k; http, server, location
fastcgi_temp_path fastcgi_temp_path path [level1 [level2 [level3]]]; fastcgi_temp_path fastcgi_temp; http, server, location
Flv flv; - Location
geo (ngx_http_geo_module) geo [$address] $variable { ... } - http
geo (ngx_stream_geo_module) geo [$address] $variable { ... } - Stream
geoip_city (ngx_http_geoip_module) geoip_city file; - http
geoip_city (ngx_stream_geoip_module) geoip_city file; - Stream
geoip_country (ngx_http_geoip_module) geoip_country file; - http
geoip_country (ngx_stream_geoip_module) geoip_country file; - Stream
geoip_org (ngx_http_geoip_module) geoip_org file; - http
geoip_org (ngx_stream_geoip_module) geoip_org file; - Stream
geoip_proxy geoip_proxy address | CIDR; - http
geoip_proxy_recursive geoip_proxy_recursive on | off; geoip_proxy_recursive off; http
google_perftools_profiles google_perftools_profiles file; - Main
grpc_bind grpc_bind address [transparent ] | off; - http, server, location
grpc_buffer_size grpc_buffer_size size; grpc_buffer_size 4k|8k; http, server, location
grpc_connect_timeout grpc_connect_timeout time; grpc_connect_timeout 60s; http, server, location
grpc_hide_header grpc_hide_header field; - http, server, location
grpc_ignore_headers grpc_ignore_headers field ...; - http, server, location
grpc_intercept_errors grpc_intercept_errors on | off; grpc_intercept_errors off; http, server, location
grpc_next_upstream grpc_next_upstream error | timeout | invalid_header | http_500 | http_502 | http_503 | http_504 | http_403 | http_404 | http_429 | non_idempotent | off ...; grpc_next_upstream error timeout; http, server, location
grpc_next_upstream_timeout grpc_next_upstream_timeout time; grpc_next_upstream_timeout 0; http, server, location
grpc_next_upstream_tries grpc_next_upstream_tries number; grpc_next_upstream_tries 0; http, server, location
grpc_pass grpc_pass address; - location, if in location
grpc_pass_header grpc_pass_header field; - http, server, location
grpc_read_timeout grpc_read_timeout time; grpc_read_timeout 60s; http, server, location
grpc_send_timeout grpc_send_timeout time; grpc_send_timeout 60s; http, server, location
grpc_set_header grpc_set_header field value; grpc_set_header Content-Length $content_length; http, server, location
grpc_socket_keepalive grpc_socket_keepalive on | off; grpc_socket_keepalive off; http, server, location
grpc_ssl_certificate grpc_ssl_certificate file; - http, server, location
grpc_ssl_certificate_key grpc_ssl_certificate_key file; - http, server, location
grpc_ssl_ciphers grpc_ssl_ciphers ciphers; grpc_ssl_ciphers DEFAULT; http, server, location
grpc_ssl_crl grpc_ssl_crl file; - http, server, location
grpc_ssl_name grpc_ssl_name name; grpc_ssl_name host from grpc_pass; http, server, location
grpc_ssl_password_file grpc_ssl_password_file file; - http, server, location
grpc_ssl_protocols grpc_ssl_protocols [SSLv2] [SSLv3] [TLSv1] [TLSv1.1] [TLSv1.2] [TLSv1.3]; grpc_ssl_protocols TLSv1 TLSv1.1 TLSv1.2; http, server, location
grpc_ssl_server_name grpc_ssl_server_name on | off; grpc_ssl_server_name off; http, server, location
grpc_ssl_session_reuse grpc_ssl_session_reuse on | off; grpc_ssl_session_reuse on; http, server, location
grpc_ssl_trusted_certificate grpc_ssl_session_reuse on | off; grpc_ssl_session_reuse on; http, server, location
grpc_ssl_verify grpc_ssl_verify on | off; grpc_ssl_verify off; http, server, location
grpc_ssl_verify_depth grpc_ssl_verify_depth number; grpc_ssl_verify_depth 1; http, server, location
Gunzip gunzip on | off; gunzip off; http, server, location
gunzip_buffers gunzip_buffers number size; gunzip_buffers 32 4k|16 8k; http, server, location
Gzip gzip on | off; gzip off; http, server, location, if in location
gzip_buffers gzip_buffers number size; gzip_buffers 32 4k|16 8k; http, server, location
gzip_comp_level gzip_comp_level level; gzip_comp_level 1; http, server, location
gzip_disable gzip_disable regex ...; - http, server, location
gzip_http_version gzip_http_version 1.0 | 1.1; gzip_http_version 1.1; http, server, location
gzip_min_length gzip_min_length length; gzip_min_length 20; http, server, location
gzip_proxied gzip_proxied off | expired | no-cache | no-store | private | no_last_modified | no_etag | auth | any ...; Default: gzip_proxied off; http, server, location
gzip_static gzip_static on | off | always; gzip_static off; http, server, location
gzip_types gzip_types mime-type ...; gzip_types text/html; http, server, location
gzip_vary gzip_vary on | off; gzip_vary off; http, server, location
hash (ngx_http_upstream_module) hash key [consistent]; - Upstream
hash (ngx_stream_upstream_module) hash key [consistent]; - Upstream
health_check (ngx_http_upstream_hc_module) health_check [parameters]; - Location
health_check (ngx_stream_upstream_hc_module) health_check [parameters]; - Server
health_check_timeout health_check_timeout timeout; health_check_timeout 5s; stream, server
Hls hls; - Location
hls_buffers hls_buffers number size; hls_buffers 8 2m; http, server, location
hls_forward_args hls_forward_args on | off; hls_forward_args off; http, server, location
hls_fragment hls_fragment time; hls_fragment 5s; http, server, location
hls_mp4_buffer_size hls_mp4_buffer_size size; hls_mp4_buffer_size 512k; http, server, location
hls_mp4_max_buffer_size hls_mp4_max_buffer_size size; hls_mp4_max_buffer_size 10m; http, server, location
http http { ... } - Main
http2_body_preread_size http2_body_preread_size size; http2_body_preread_size 64k; http, server
http2_chunk_size http2_chunk_size size; http2_chunk_size 8k; http, server, location
http2_idle_timeout http2_idle_timeout time; http2_idle_timeout 3m; http, server
http2_max_concurrent_pushes http2_max_concurrent_pushes number; http2_max_concurrent_pushes 10; http, server
http2_max_concurrent_streams http2_max_concurrent_streams number; http2_max_concurrent_streams 128; http, server
http2_max_field_size http2_max_field_size size; http2_max_field_size 4k; http, server
http2_max_header_size http2_max_header_size size; http2_max_header_size 16k; http, server
http2_max_requests http2_max_requests number; http2_max_requests 1000; http, server
http2_push http2_push uri | off; http2_push off; http, server, location
http2_push_preload http2_push_preload on | off; http2_push_preload off; http, server, location
http2_recv_buffer_size http2_recv_buffer_size size; http2_recv_buffer_size 256k; http
http2_recv_timeout http2_recv_timeout time; http2_recv_timeout 30s; http, server
If if (condition) { ... } - server, location
if_modified_since if_modified_since off | exact | before; if_modified_since exact; http, server, location
ignore_invalid_headers ignore_invalid_headers on | off; ignore_invalid_headers on; http, server
image_filter image_filter off; image_filter test; image_filter size; image_filter rotate 90 | 180 | 270; image_filter resize width height; image_filter crop width height; image_filter off; Locatioon
image_filter_buffer image_filter_buffer size; image_filter_buffer 1M; http, server, location
image_filter_interlace image_filter_interlace on | off; image_filter_interlace off; http, server, location
image_filter_jpeg_quality image_filter_jpeg_quality quality; image_filter_jpeg_quality 75; http, server, location
image_filter_sharpen image_filter_sharpen percent; image_filter_sharpen 0; http, server, location
image_filter_transparency image_filter_transparency on|off; image_filter_transparency on; http, server, location
image_filter_webp_quality image_filter_webp_quality quality; image_filter_webp_quality 80; http, server, location
imap_auth imap_auth method ...; imap_auth plain; mail, server
imap_capabilities imap_capabilities extension ...; imap_capabilities IMAP4 IMAP4rev1 UIDPLUS; mail, server
imap_client_buffer imap_capabilities extension ...; imap_capabilities IMAP4 IMAP4rev1 UIDPLUS; mail, server
include include file | mask; - Any
Index index file ...; index index.html; http, server, location
internal internal; - Location
ip_hash ip_hash; - Upstream
js_access js_access function; - stream, server
js_content js_content function; - location, limit_except
js_filter js_filter function; - stream, server
js_include (ngx_http_js_module) js_include file; - http
js_include (ngx_stream_js_module) js_include file; - http
js_path (ngx_http_js_module) js_path path; - http
js_path (ngx_stream_js_module) js_path path; - http
js_preread js_preread function; - stream, server
js_set (ngx_http_js_module) js_set $variable function; - http
js_set (ngx_stream_js_module) js_set $variable function; - Stream
Keepalive keepalive connections; - Upstream
keepalive_disable keepalive_disable none | browser ...; keepalive_disable msie6; http, server, location
keepalive_requests (ngx_http_core_module) keepalive_requests number; keepalive_requests 100; http, server, location
keepalive_requests (ngx_http_upstream_module) keepalive_requests number; keepalive_requests 100; Upstream
keepalive_timeout (ngx_http_core_module) keepalive_timeout timeout [header_timeout]; keepalive_timeout 75s; http, server, location
keepalive_timeout (ngx_http_upstream_module) keepalive_timeout timeout; keepalive_timeout 60s; Upstream
keyval (ngx_http_keyval_module) keyval key $variable zone=name; - http
keyval (ngx_stream_keyval_module) keyval key $variable zone=name; - Stream
keyval_zone (ngx_http_keyval_module) keyval_zone zone=name:size [state=file] [timeout=time] [sync]; - http
keyval_zone (ngx_stream_keyval_module) keyval_zone zone=name:size [state=file] [timeout=time] [sync]; - Stream
large_client_header_buffers large_client_header_buffers number size; large_client_header_buffers 4 8k; http, server
least_conn (ngx_http_upstream_module) least_conn; - Upstream
least_conn (ngx_stream_upstream_module) least_conn; - Upstream
least_time (ngx_http_upstream_module) least_time header | last_byte [inflight]; - Upstream
least_time (ngx_stream_upstream_module) least_time connect | first_byte | last_byte [inflight]; - Upstream
limit_conn (ngx_http_limit_conn_module) limit_conn zone number; - http, server, location
limit_conn_log_level (ngx_http_limit_conn_module)  limit_conn_log_level info | notice | warn | error; limit_conn_log_level error; http, server, location
limit_conn_log_level (ngx_stream_limit_conn_module) limit_conn_log_level info | notice | warn | error; limit_conn_log_level error; stream, server
limit_conn_status limit_conn_status code; limit_conn_status 503; http, server, location
limit_conn_zone (ngx_http_limit_conn_module) limit_conn_zone key zone=name:size; - http
limit_conn_zone (ngx_stream_limit_conn_module) limit_conn_log_level info | notice | warn | error; limit_conn_log_level error; stream, server
limit_except limit_except method ... { ... } - Location
limit_rate limit_rate rate; limit_rate 0; http, server, location, if in location
limit_rate_after limit_rate_after size; limit_rate_after 0; http, server, location, if in location
limit_req limit_req zone=name [burst=number] [nodelay | delay=number]; - http, server, location
limit_req_log_level limit_req_log_level info | notice | warn | error; limit_req_log_level error; http, server, location
limit_req_status limit_req_status code; limit_req_status 503; http, server, location
limit_req_zone limit_req_zone key zone=name:size rate=rate [sync]; - http
limit_zone limit_zone name $variable size; - http
lingering_close lingering_close off | on | always; lingering_close on; http, server, location
lingering_time lingering_time time; lingering_time 30s; http, server, location
lingering_timeout lingering_timeout time; lingering_timeout 5s; http, server, location
listen (ngx_http_core_module)                 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] [backlog=number] [rcvbuf=size] [sndbuf=size] [accept_filter=filter] [deferred] [bind] [ipv6only=on|off] [reuseport] [so_keepalive=on|off|[keepidle]:[keepintvl]:[keepcnt]]; listen unix:path [default_server] [ssl] [http2 | spdy] [proxy_protocol] [backlog=number] [rcvbuf=size] [sndbuf=size] [accept_filter=filter] [deferred] [bind] [so_keepalive=on|off|[keepidle]:[keepintvl]:[keepcnt]]; listen *:80 | *:8000; Server
listen (ngx_mail_core_module) listen address:port [ssl] [backlog=number] [rcvbuf=size] [sndbuf=size] [bind] [ipv6only=on|off] [so_keepalive=on|off|[keepidle]:[keepintvl]:[keepcnt]]; - Server
listen (ngx_stream_core_module) Syntax: listen address:port [ssl] [udp] [proxy_protocol] [backlog=number] [rcvbuf=size] [sndbuf=size] [bind] [ipv6only=on|off] [reuseport] [so_keepalive=on|off|[keepidle]:[keepintvl]:[keepcnt]]; - Server
load_module load_module file; - Main
Location location [ = | ~ | ~* | ^~ ] uri { ... } - Server,location
lock_file lock_file file; lock_file logs/nginx.lock; Main
log_format (ngx_http_log_module) log_format name [escape=default|json|none] string ...; log_format combined "..."; http
log_format (ngx_stream_log_module) log_format name [escape=default|json|none] string ...; - Stream
log_not_found log_not_found on | off; log_not_found on; http, server, location
log_subrequest log_subrequest on | off; log_subrequest off; http, server, location
mail mail { ... } - Main
map (ngx_http_map_module) map string $variable { ... } - http
map (ngx_stream_map_module) map string $variable { ... } - Stream
map_hash_bucket_size (ngx_http_map_module) map_hash_bucket_size size; map_hash_bucket_size 32|64|128; http
map_hash_bucket_size (ngx_stream_map_module) map_hash_bucket_size size; map_hash_bucket_size 32|64|128; Stream
map_hash_max_size (ngx_http_map_module) map_hash_max_size size; map_hash_max_size 2048; http
map_hash_max_size (ngx_stream_map_module) map_hash_max_size size; map_hash_max_size 2048; Stream
master_process master_process on | off; master_process on; Main
match (ngx_http_upstream_hc_module) match name { ... } - http
match (ngx_stream_upstream_hc_module) match name { ... } - Stream
max_ranges max_ranges number; - http, server, location
memcached_bind memcached_bind address [transparent ] | off; - http, server, location
memcached_buffer_size memcached_buffer_size size; memcached_buffer_size 4k|8k; http, server, location
memcached_connect_timeout memcached_connect_timeout time; memcached_connect_timeout 60s; http, server, location
memcached_force_ranges memcached_force_ranges on | off; memcached_force_ranges off; http, server, location
memcached_gzip_flag memcached_gzip_flag flag; - http, server, location
memcached_next_upstream memcached_next_upstream error | timeout | invalid_response | not_found | off ...; memcached_next_upstream error timeout; http, server, location
memcached_next_upstream_timeout memcached_next_upstream_timeout time; memcached_next_upstream_timeout 0; http, server, location
memcached_next_upstream_tries memcached_next_upstream_tries number; memcached_next_upstream_tries 0; http, server, location
memcached_pass memcached_pass address; - location, if in location
memcached_read_timeout memcached_read_timeout time; memcached_read_timeout 60s; http, server, location
memcached_send_timeout memcached_send_timeout time; memcached_send_timeout 60s; http, server, location
memcached_socket_keepalive memcached_socket_keepalive on | off; memcached_socket_keepalive off; http, server, location
merge_slashes merge_slashes on | off; merge_slashes on; http, server
min_delete_depth min_delete_depth number; min_delete_depth 0; http, server, location
Mirror mirror uri | off; mirror off; http, server, location
mirror_request_body mirror_request_body on | off; mirror_request_body on; http, server, location
modern_browser modern_browser browser version; modern_browser unlisted; http, server, location
modern_browser_value modern_browser browser version; modern_browser unlisted; - http, server, location
mp4 mp4; - Location
mp4_buffer_size mp4_buffer_size size; mp4_buffer_size 512K; http, server, location
mp4_limit_rate mp4_limit_rate on | off | factor; mp4_limit_rate off; http, server, location
mp4_limit_rate_after mp4_limit_rate on | off | factor; mp4_limit_rate off; http, server, location
mp4_max_buffer_size mp4_max_buffer_size size; mp4_max_buffer_size 10M; http, server, location
msie_padding msie_padding on | off; msie_padding on; http, server, location
msie_refresh msie_refresh on | off; msie_refresh off; http, server, location
multi_accept multi_accept on | off; multi_accept off; Events
ntlm ntlm; - Upstream
open_file_cache open_file_cache off; open_file_cache max=N [inactive=time]; open_file_cache off; http, server, location
open_file_cache_errors open_file_cache_errors on | off; open_file_cache_errors off; http, server, location
open_file_cache_min_uses open_file_cache_min_uses number; open_file_cache_min_uses 1; http, server, location
open_file_cache_valid open_file_cache_valid time; open_file_cache_valid 60s; http, server, location
open_log_file_cache (ngx_http_log_module) open_log_file_cache max=N [inactive=time] [min_uses=N] [valid=time]; open_log_file_cache off; open_log_file_cache off; http, server, location
open_log_file_cache (ngx_stream_log_module) open_log_file_cache max=N [inactive=time] [min_uses=N] [valid=time]; open_log_file_cache off; open_log_file_cache off; stream, server
output_buffers output_buffers number size; output_buffers 2 32k; http, server, location
override_charset override_charset on | off; override_charset off; http, server, location, if in location
pcre_jit pcre_jit on | off; pcre_jit off; Main
perl perl module::function|'sub { ... }'; - location, limit_except
perl_modules perl_modules path; - http
perl_require perl_require module; - http
perl_set perl_set $variable module::function|'sub { ... }'; - http
Pid pid file; pid logs/nginx.pid; Main
pop3_auth pop3_auth method ...; pop3_auth plain; mail, server
pop3_capabilities pop3_capabilities extension ...; pop3_capabilities TOP USER UIDL; mail, server
port_in_redirect port_in_redirect on | off; port_in_redirect on; http, server, location
postpone_output postpone_output size; postpone_output 1460; http, server, location
preread_buffer_size preread_buffer_size size; preread_buffer_size 16k; stream, server
preread_timeout preread_timeout timeout; preread_timeout 30s; stream, server
protocol protocol imap | pop3 | smtp; - Server
proxy_bind (ngx_http_proxy_module) proxy_bind address [transparent] | off; - http, server, location
proxy_bind (ngx_stream_proxy_module) proxy_bind address [transparent] | off; - stream, server
proxy_buffer proxy_buffer size; proxy_buffer 4k|8k; mail, server
proxy_buffer_size (ngx_http_proxy_module) proxy_buffer_size size; proxy_buffer_size 4k|8k; http, server, location
proxy_buffer_size (ngx_stream_proxy_module) proxy_buffer_size size; proxy_buffer_size 16k; stream, server
proxy_buffering proxy_buffering on | off; proxy_buffering on; http, server, location
proxy_buffers proxy_buffers number size; proxy_buffers 8 4k|8k; http, server, location
proxy_busy_buffers_size proxy_busy_buffers_size size; proxy_busy_buffers_size 8k|16k; http, server, location
proxy_cache proxy_cache zone | off; proxy_cache off; http, server, location
proxy_cache_background_update proxy_cache_background_update on | off; proxy_cache_background_update off; http, server, location
proxy_cache_bypass proxy_cache_bypass string ...; - http, server, location
proxy_cache_convert_head proxy_cache_convert_head on | off; proxy_cache_convert_head on; http, server, location
proxy_cache_key proxy_cache_key string; proxy_cache_key $scheme$proxy_host$request_uri; http, server, location
proxy_cache_lock proxy_cache_lock on | off; proxy_cache_lock off; http, server, location
proxy_cache_lock_age proxy_cache_lock_age time; proxy_cache_lock_age 5s; http, server, location
proxy_cache_lock_timeout proxy_cache_lock_timeout time; proxy_cache_lock_timeout 5s; http, server, location
proxy_cache_max_range_offset proxy_cache_max_range_offset number; - http, server, location
proxy_cache_methods proxy_cache_methods GET | HEAD | POST ...; proxy_cache_methods GET HEAD; http, server, location
proxy_cache_min_uses proxy_cache_min_uses number; proxy_cache_min_uses 1; http, server, location
proxy_cache_path proxy_cache_path path [levels=levels] [use_temp_path=on|off] keys_zone=name:size [inactive=time] [max_size=size] [manager_files=number] [manager_sleep=time] [manager_threshold=time] [loader_files=number] [loader_sleep=time] [loader_threshold=time] [purger=on|off] [purger_files=number] [purger_sleep=time] [purger_threshold=time]; - http
proxy_cache_purge proxy_cache_purge string ...; - http, server, location
proxy_cache_revalidate proxy_cache_revalidate on | off; proxy_cache_revalidate off; http, server, location
proxy_cache_use_stale proxy_cache_use_stale error | timeout | invalid_header | updating | http_500 | http_502 | http_503 | http_504 | http_403 | http_404 | http_429 | off ...; proxy_cache_use_stale off; http, server, location
proxy_cache_valid proxy_cache_valid [code ...] time; - http, server, location
proxy_connect_timeout (ngx_http_proxy_module) proxy_connect_timeout time; proxy_connect_timeout 60s; http, server, location
proxy_connect_timeout (ngx_stream_proxy_module) proxy_connect_timeout time; proxy_connect_timeout 60s; stream, server
proxy_cookie_domain proxy_cookie_domain off; proxy_cookie_domain domain replacement; proxy_cookie_domain off; http, server, location
proxy_cookie_path proxy_cookie_path off; proxy_cookie_path path replacement; proxy_cookie_path off; http, server, location
proxy_download_rate proxy_download_rate 0; - stream, server
proxy_force_ranges proxy_force_ranges on | off; proxy_force_ranges off; http, server, location
proxy_headers_hash_bucket_size proxy_headers_hash_bucket_size size; proxy_headers_hash_bucket_size 64; http, server, location
proxy_headers_hash_max_size proxy_headers_hash_max_size size; proxy_headers_hash_max_size 512; http, server, location
proxy_hide_header proxy_hide_header field; - http, server, location
proxy_http_version proxy_http_version 1.0 | 1.1; proxy_http_version 1.0; http, server, location
proxy_ignore_client_abort proxy_ignore_client_abort on | off; proxy_ignore_client_abort off; http, server, location
proxy_ignore_headers proxy_ignore_headers field ...; - http, server, location
proxy_intercept_errors proxy_intercept_errors on | off; proxy_intercept_errors off; http, server, location
proxy_limit_rate proxy_limit_rate rate; proxy_limit_rate 0; http, server, location
proxy_max_temp_file_size proxy_max_temp_file_size size; proxy_max_temp_file_size 1024m; http, server, location
proxy_method proxy_method method; - http, server, location
proxy_next_upstream (ngx_http_proxy_module) proxy_next_upstream error | timeout | invalid_header | http_500 | http_502 | http_503 | http_504 | http_403 | http_404 | http_429 | non_idempotent | off ...; proxy_next_upstream error timeout; http, server, location
proxy_next_upstream (ngx_stream_proxy_module) proxy_next_upstream on | off; proxy_next_upstream on; stream, server
proxy_next_upstream_timeout (ngx_http_proxy_module) proxy_next_upstream_timeout time; proxy_next_upstream_timeout 0; http, server, location
proxy_next_upstream_timeout (ngx_stream_proxy_module) proxy_next_upstream_timeout time; proxy_next_upstream_timeout 0; stream, server
proxy_next_upstream_tries (ngx_http_proxy_module) proxy_next_upstream_tries number; proxy_next_upstream_tries 0; http, server, location
proxy_next_upstream_tries (ngx_stream_proxy_module) proxy_next_upstream_tries number; proxy_next_upstream_tries 0; stream, server
proxy_no_cache proxy_no_cache string ...; - http, server, location
proxy_pass (ngx_http_proxy_module) proxy_pass URL; - location, if in location, limit_except
proxy_pass (ngx_stream_proxy_module) proxy_pass address; - Server
proxy_pass_error_message proxy_pass_error_message on | off; proxy_pass_error_message off; mail, server
proxy_pass_header proxy_pass_header field; - http, server, location
proxy_pass_request_body proxy_pass_request_body on | off; proxy_pass_request_body on; http, server, location
proxy_pass_request_headers proxy_pass_request_headers on | off; proxy_pass_request_headers on; http, server, location
proxy_protocol proxy_protocol on | off; proxy_protocol off; stream, server
proxy_protocol_timeout proxy_protocol_timeout timeout; proxy_protocol_timeout 30s; stream, server
proxy_read_timeout proxy_read_timeout time; proxy_read_timeout 60s; http, server, location
proxy_redirect proxy_redirect default; proxy_redirect off; proxy_redirect redirect replacement; proxy_redirect default; http, server, location
proxy_request_buffering proxy_request_buffering on | off; proxy_request_buffering on; http, server, location
proxy_requests proxy_requests number; proxy_requests 0; stream, server
proxy_responses proxy_responses number; - stream, server
proxy_send_lowat proxy_send_lowat size; proxy_send_lowat 0; http, server, location
proxy_send_timeout proxy_send_timeout time; proxy_send_timeout 60s; http, server, location
proxy_session_drop proxy_session_drop on | off; proxy_session_drop off; stream, server
proxy_set_body proxy_set_body value; - http, server, location
proxy_set_header proxy_set_header field value; proxy_set_header Host $proxy_host; proxy_set_header Connection close; http, server, location
proxy_socket_keepalive (ngx_http_proxy_module) proxy_socket_keepalive on | off; proxy_socket_keepalive off; http, server, location
proxy_socket_keepalive (ngx_stream_proxy_module) proxy_socket_keepalive on | off; proxy_socket_keepalive off; stream, server
proxy_ssl proxy_ssl on | off; proxy_ssl off; stream, server
proxy_ssl_certificate (ngx_http_proxy_module) proxy_ssl_certificate file; - http, server, location
proxy_ssl_certificate (ngx_stream_proxy_module) proxy_ssl_certificate file; - stream, server
proxy_ssl_certificate_key (ngx_http_proxy_module) proxy_ssl_certificate_key file; - http, server, location
proxy_ssl_certificate_key (ngx_stream_proxy_module) proxy_ssl_certificate_key file; - stream, server
proxy_ssl_ciphers (ngx_http_proxy_module) proxy_ssl_ciphers ciphers; proxy_ssl_ciphers DEFAULT; http, server, location
proxy_ssl_ciphers (ngx_stream_proxy_module) proxy_ssl_ciphers ciphers; proxy_ssl_ciphers DEFAULT; stream, server
proxy_ssl_crl (ngx_http_proxy_module) proxy_ssl_crl file; - http, server, location
proxy_ssl_crl (ngx_stream_proxy_module) proxy_ssl_crl file; - stream, server
proxy_ssl_name (ngx_http_proxy_module) proxy_ssl_name name; proxy_ssl_name $proxy_host; http, server, location
proxy_ssl_name (ngx_stream_proxy_module) proxy_ssl_name name; proxy_ssl_name host from proxy_pass; stream, server
proxy_ssl_password_file (ngx_http_proxy_module) proxy_ssl_password_file file; - http, server, location
proxy_ssl_password_file (ngx_stream_proxy_module) proxy_ssl_password_file file; - stream, server
proxy_ssl_protocols (ngx_http_proxy_module) proxy_ssl_protocols [SSLv2] [SSLv3] [TLSv1] [TLSv1.1] [TLSv1.2] [TLSv1.3]; proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2; http, server, location
proxy_ssl_protocols (ngx_stream_proxy_module) proxy_ssl_protocols [SSLv2] [SSLv3] [TLSv1] [TLSv1.1] [TLSv1.2] [TLSv1.3]; proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2; stream, server
proxy_ssl_server_name (ngx_http_proxy_module) proxy_ssl_server_name on | off; proxy_ssl_server_name off; http, server, location
proxy_ssl_server_name (ngx_stream_proxy_module) proxy_ssl_server_name on | off; proxy_ssl_server_name off; stream, server
proxy_ssl_session_reuse (ngx_http_proxy_module) proxy_ssl_session_reuse on | off; proxy_ssl_session_reuse on; http, server, location
proxy_ssl_session_reuse (ngx_stream_proxy_module) proxy_ssl_session_reuse on | off; proxy_ssl_session_reuse on; stream, server
proxy_ssl_trusted_certificate (ngx_http_proxy_module) proxy_ssl_trusted_certificate file; - http, server, location
proxy_ssl_trusted_certificate (ngx_stream_proxy_module) proxy_ssl_trusted_certificate file; - stream, server
proxy_ssl_verify (ngx_http_proxy_module) proxy_ssl_verify on | off; proxy_ssl_verify off; http, server, location
proxy_ssl_verify (ngx_stream_proxy_module) proxy_ssl_verify on | off; proxy_ssl_verify off; stream, server
proxy_ssl_verify_depth (ngx_http_proxy_module) proxy_ssl_verify_depth number; proxy_ssl_verify_depth 1; http, server, location
proxy_ssl_verify_depth (ngx_stream_proxy_module) proxy_ssl_verify_depth number; proxy_ssl_verify_depth 1; stream, server
proxy_store proxy_store on | off | string; proxy_store off; http, server, location
proxy_store_access proxy_store_access users:permissions ...; proxy_store_access user:rw; http, server, location
proxy_temp_file_write_size proxy_temp_file_write_size size; proxy_temp_file_write_size 8k|16k; http, server, location
proxy_temp_path proxy_temp_path path [level1 [level2 [level3]]]; proxy_temp_path proxy_temp; http, server, location
proxy_timeout (ngx_mail_proxy_module) proxy_timeout timeout; proxy_timeout 24h; mail, server
proxy_timeout (ngx_stream_proxy_module) proxy_timeout timeout; proxy_timeout 10m; stream, server
proxy_upload_rate proxy_timeout timeout; proxy_timeout 10m; stream, server
Queue queue number [timeout=time]; - Upstream
random (ngx_http_upstream_module) random [two [method]]; - Upstream
random (ngx_stream_upstream_module) random [two [method]]; - Upstream
random_index random_index on | off; random_index off; Location
read_ahead read_ahead size; read_ahead 0; http, server, location
real_ip_header real_ip_header field | X-Real-IP | X-Forwarded-For | proxy_protocol; real_ip_header X-Real-IP; http, server, location
real_ip_recursive real_ip_recursive on | off; real_ip_recursive off; http, server, location
recursive_error_pages recursive_error_pages on | off; recursive_error_pages off; http, server, location
referer_hash_bucket_size referer_hash_bucket_size size; referer_hash_bucket_size 64; server, location
referer_hash_max_size referer_hash_max_size size; referer_hash_max_size 2048; server, location
request_pool_size request_pool_size size; request_pool_size 4k; http, server
reset_timedout_connection reset_timedout_connection on | off; reset_timedout_connection off; http, server, location
resolver (ngx_http_core_module) resolver address ... [valid=time] [ipv6=on|off]; - http, server, location
resolver (ngx_mail_core_module) resolver address ... [valid=time]; resolver off; resolver off; mail, server
resolver (ngx_stream_core_module) resolver address ... [valid=time] [ipv6=on|off]; - stream, server
resolver_timeout (ngx_http_core_module) resolver_timeout time; resolver_timeout 30s; http, server, location
resolver_timeout (ngx_mail_core_module) resolver_timeout time; resolver_timeout 30s; mail, server
resolver_timeout (ngx_stream_core_module) resolver_timeout time; resolver_timeout 30s; stream, server
return (ngx_http_rewrite_module) return code [text]; return code URL; return URL; - server, location, if
return (ngx_stream_return_module) return value; - Server
rewrite rewrite regex replacement [flag]; - server, location, if
rewrite_log rewrite_log on | off; rewrite_log off; http, server, location, if
Root root path; root html; http, server, location, if in location
satisfy satisfy all | any; satisfy all; http, server, location
scgi_bind scgi_bind address [transparent] | off; - http, server, location
scgi_buffer_size scgi_buffer_size size; scgi_buffer_size 4k|8k; http, server, location
scgi_buffering scgi_buffering on | off; scgi_buffering on; http, server, location
scgi_buffers scgi_buffers number size; scgi_buffers 8 4k|8k; http, server, location
scgi_busy_buffers_size scgi_busy_buffers_size size; scgi_busy_buffers_size 8k|16k; http, server, location
scgi_cache scgi_cache zone | off; scgi_cache off; http, server, location
scgi_cache_background_update scgi_cache_background_update on | off; scgi_cache_background_update off; http, server, location
scgi_cache_bypass scgi_cache_bypass string ...; - http, server, location
scgi_cache_key scgi_cache_key string; - http, server, location
scgi_cache_lock scgi_cache_lock on | off; scgi_cache_lock off; http, server, location
scgi_cache_lock_age scgi_cache_lock_age time; scgi_cache_lock_age 5s; http, server, location
scgi_cache_lock_timeout scgi_cache_lock_timeout time; scgi_cache_lock_timeout 5s; http, server, location
scgi_cache_max_range_offset scgi_cache_max_range_offset number; - http, server, location
scgi_cache_methods scgi_cache_methods GET | HEAD | POST ...; scgi_cache_methods GET HEAD; http, server, location
scgi_cache_min_uses scgi_cache_min_uses number; scgi_cache_min_uses 1; http, server, location
scgi_cache_path scgi_cache_path path [levels=levels] [use_temp_path=on|off] keys_zone=name:size [inactive=time] [max_size=size] [manager_files=number] [manager_sleep=time] [manager_threshold=time] [loader_files=number] [loader_sleep=time] [loader_threshold=time] [purger=on|off] [purger_files=number] [purger_sleep=time] [purger_threshold=time]; - http
scgi_cache_purge scgi_cache_purge string ...; - http, server, location
scgi_cache_revalidate scgi_cache_revalidate on | off; scgi_cache_revalidate off; http, server, location
scgi_cache_use_stale scgi_cache_use_stale error | timeout | invalid_header | updating | http_500 | http_503 | http_403 | http_404 | http_429 | off ...; scgi_cache_use_stale off; http, server, location
scgi_cache_valid scgi_cache_valid [code ...] time; - http, server, location
scgi_connect_timeout scgi_connect_timeout time; scgi_connect_timeout 60s; http, server, location
scgi_force_ranges scgi_force_ranges on | off; scgi_force_ranges off; http, server, location
scgi_hide_header scgi_hide_header field; - http, server, location
scgi_ignore_client_abort scgi_ignore_client_abort on | off; scgi_ignore_client_abort off; http, server, location
scgi_ignore_headers scgi_ignore_headers field ...; - http, server, location
scgi_intercept_errors scgi_intercept_errors on | off; scgi_intercept_errors off; http, server, location
scgi_limit_rate scgi_limit_rate rate; scgi_limit_rate 0; http, server, location
scgi_max_temp_file_size scgi_max_temp_file_size size; scgi_max_temp_file_size 1024m; http, server, location
scgi_next_upstream scgi_next_upstream error | timeout | invalid_header | http_500 | http_503 | http_403 | http_404 | http_429 | non_idempotent | off ...; scgi_next_upstream error timeout; http, server, location
scgi_next_upstream_timeout scgi_next_upstream_timeout time; scgi_next_upstream_timeout 0; http, server, location
scgi_next_upstream_tries scgi_next_upstream_tries number; scgi_next_upstream_tries 0; http, server, location
scgi_no_cache scgi_no_cache string ...; - http, server, location
scgi_param scgi_param parameter value [if_not_empty]; - http, server, location
scgi_pass scgi_pass address; - location, if in location
scgi_pass_header scgi_pass_header field; - http, server, location
scgi_pass_request_body scgi_pass_request_body on | off; scgi_pass_request_body on; http, server, location
scgi_pass_request_headers scgi_pass_request_headers on | off; scgi_pass_request_headers on; http, server, location
scgi_read_timeout scgi_read_timeout time; scgi_read_timeout 60s; http, server, location
scgi_request_buffering scgi_request_buffering on | off; scgi_request_buffering on; http, server, location
scgi_send_timeout scgi_send_timeout time; scgi_send_timeout 60s; http, server, location
scgi_socket_keepalive scgi_socket_keepalive on | off; scgi_socket_keepalive off; http, server, location
scgi_store scgi_store on | off | string; scgi_store off; http, server, location
scgi_store_access scgi_store_access users:permissions ...; scgi_store_access user:rw; http, server, location
scgi_temp_file_write_size scgi_temp_file_write_size size; scgi_temp_file_write_size 8k|16k; http, server, location
scgi_temp_path scgi_temp_file_write_size size; scgi_temp_file_write_size 8k|16k; http, server, location
secure_link secure_link expression; - http, server, location
secure_link_md5 secure_link_md5 expression; - http, server, location
secure_link_secret secure_link_secret word; - Location
send_lowat send_lowat size; send_lowat 0; http, server, location
send_timeout send_timeout time; send_timeout 60s; http, server, location
Sendfile sendfile on | off; sendfile on | off; http, server, location, if in location
sendfile_max_chunk sendfile_max_chunk size; sendfile_max_chunk 0; http, server, location
server (ngx_http_core_module) server { ... } - http
server (ngx_http_upstream_module) server address [parameters]; - Upstream
server (ngx_mail_core_module) server { ... } - Mail
server (ngx_stream_core_module) server { ... } - Stream
server (ngx_stream_upstream_module) server address [parameters]; - Upstream
server_name (ngx_http_core_module) server_name name ...; server_name ""; Server
server_name (ngx_mail_core_module) server_name name; server_name hostname; mail, server
server_name_in_redirect server_name_in_redirect on | off; server_name_in_redirect off; http, server, location
server_names_hash_bucket_size server_names_hash_bucket_size size; server_names_hash_bucket_size 32|64|128; http
server_names_hash_max_size server_names_hash_max_size size; server_names_hash_max_size 512; http
server_tokens server_tokens on | off | build | string; server_tokens on; http, server, location
session_log session_log name | off; session_log off; http, server, location
session_log_format session_log_format name string ...; session_log_format combined "..."; http
session_log_zone session_log_zone path zone=name:size [format=format] [timeout=time] [id=id] [md5=md5] ; - http
set set $variable value; - server, location, if
set_real_ip_from (ngx_http_realip_module) set_real_ip_from address | CIDR | unix:; - http, server, location
set_real_ip_from (ngx_stream_realip_module) set_real_ip_from address | CIDR | unix:; - stream, server
Slice slice size; slice 0; http, server, location
smtp_auth smtp_auth method ...; smtp_auth login plain; mail, server
smtp_capabilities smtp_capabilities extension ...; - mail, server
smtp_client_buffer smtp_capabilities extension ...; - mail, server
smtp_greeting_delay smtp_capabilities extension ...; - mail, server
source_charset override_charset on | off; override_charset off; http, server, location, if in location
spdy_chunk_size spdy_chunk_size size; spdy_chunk_size 8k; http, server, location
spdy_headers_comp spdy_chunk_size size; spdy_chunk_size 8k; http, server, location
split_clients (ngx_http_split_clients_module) split_clients string $variable { ... } - http
split_clients (ngx_stream_split_clients_module) split_clients string $variable { ... } - Stream
ssi ssi on | off; ssi off; http, server, location, if in location
ssi_last_modified ssi_last_modified on | off; ssi_last_modified off; http, server, location
ssi_min_file_chunk ssi_min_file_chunk size; ssi_min_file_chunk 1k; http, server, location
ssi_silent_errors ssi_silent_errors on | off; ssi_silent_errors off; http, server, location
ssi_types ssi_types mime-type ...; ssi_types text/html; http, server, location
ssi_value_length ssi_value_length length; ssi_value_length 256; http, server, location
ssl (ngx_http_ssl_module) ssl on | off; ssl off; http, server
ssl (ngx_mail_ssl_module) ssl on | off; ssl off; mail, server
ssl_buffer_size ssl_buffer_size size; ssl_buffer_size 16k; http, server
ssl_certificate (ngx_http_ssl_module) ssl_certificate file; - http, server
ssl_certificate (ngx_mail_ssl_module) ssl_certificate file; - mail, server
ssl_certificate (ngx_stream_ssl_module) ssl_certificate file; - stream, server
ssl_certificate_key (ngx_http_ssl_module) ssl_certificate_key file; - http, server
ssl_certificate_key (ngx_mail_ssl_module) ssl_certificate_key file; - mail, server
ssl_certificate_key (ngx_stream_ssl_module) ssl_certificate_key file; - stream, server
ssl_ciphers (ngx_http_ssl_module) ssl_ciphers ciphers; ssl_ciphers HIGH:!aNULL:!MD5; http, server
ssl_ciphers (ngx_mail_ssl_module) ssl_ciphers ciphers; ssl_ciphers HIGH:!aNULL:!MD5; mail, server
ssl_ciphers (ngx_stream_ssl_module) ssl_ciphers ciphers; ssl_ciphers HIGH:!aNULL:!MD5; stream, server
ssl_client_certificate (ngx_http_ssl_module) ssl_client_certificate file; - http, server
ssl_client_certificate (ngx_mail_ssl_module) ssl_client_certificate file; - mail, server
ssl_client_certificate (ngx_stream_ssl_module) ssl_client_certificate file; - stream, server
ssl_crl (ngx_http_ssl_module) ssl_crl file; - http, server
ssl_crl (ngx_mail_ssl_module) ssl_crl file; - mail, server
ssl_crl (ngx_stream_ssl_module) ssl_crl file; - stream, server
ssl_dhparam (ngx_http_ssl_module) ssl_dhparam file; - http, server
ssl_dhparam (ngx_mail_ssl_module) ssl_dhparam file; - mail, server
ssl_dhparam (ngx_stream_ssl_module) ssl_dhparam file; - stream, server
ssl_early_data ssl_early_data on | off; ssl_early_data off; http, server
ssl_ecdh_curve (ngx_http_ssl_module) ssl_ecdh_curve curve; ssl_ecdh_curve auto; http, server
ssl_ecdh_curve (ngx_mail_ssl_module) ssl_ecdh_curve curve; ssl_ecdh_curve auto; mail, server
ssl_ecdh_curve (ngx_stream_ssl_module) ssl_ecdh_curve curve; ssl_ecdh_curve auto; stream, server
ssl_engine ssl_engine device; - Main
ssl_handshake_timeout ssl_handshake_timeout time; ssl_handshake_timeout 60s; stream, server
ssl_password_file (ngx_http_ssl_module) ssl_password_file file; - http, server
ssl_password_file (ngx_mail_ssl_module) ssl_password_file file; - mail, server
ssl_password_file (ngx_stream_ssl_module) ssl_password_file file; - stream, server
ssl_prefer_server_ciphers (ngx_http_ssl_module) ssl_prefer_server_ciphers on | off; ssl_prefer_server_ciphers off; http, server
ssl_prefer_server_ciphers (ngx_mail_ssl_module) ssl_prefer_server_ciphers on | off; ssl_prefer_server_ciphers off; mail, server
ssl_prefer_server_ciphers (ngx_stream_ssl_module) ssl_prefer_server_ciphers on | off; ssl_prefer_server_ciphers off; stream, server
ssl_preread ssl_preread on | off; ssl_preread off; stream, server
ssl_protocols (ngx_http_ssl_module) ssl_protocols [SSLv2] [SSLv3] [TLSv1] [TLSv1.1] [TLSv1.2] [TLSv1.3]; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; http, server
ssl_protocols (ngx_mail_ssl_module) ssl_protocols [SSLv2] [SSLv3] [TLSv1] [TLSv1.1] [TLSv1.2] [TLSv1.3]; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; mail, server
ssl_protocols (ngx_stream_ssl_module) ssl_protocols [SSLv2] [SSLv3] [TLSv1] [TLSv1.1] [TLSv1.2] [TLSv1.3]; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; stream, server
ssl_session_cache (ngx_http_ssl_module) ssl_session_cache off | none | [builtin[:size]] [shared:name:size]; ssl_session_cache none; http, server
ssl_session_cache (ngx_mail_ssl_module) ssl_session_cache off | none | [builtin[:size]] [shared:name:size]; ssl_session_cache none; mail, server
ssl_session_cache (ngx_stream_ssl_module) ssl_session_cache off | none | [builtin[:size]] [shared:name:size]; ssl_session_cache none; stream, server
ssl_session_ticket_key (ngx_http_ssl_module) ssl_session_ticket_key file; - http, server
ssl_session_ticket_key (ngx_mail_ssl_module) ssl_session_ticket_key file; - mail, server
ssl_session_ticket_key (ngx_stream_ssl_module) ssl_session_ticket_key file; - stream, server
ssl_session_tickets (ngx_http_ssl_module) ssl_session_tickets on | off; ssl_session_tickets on; http, server
ssl_session_tickets (ngx_mail_ssl_module) ssl_session_tickets on | off; ssl_session_tickets on; mail, server
ssl_session_tickets (ngx_stream_ssl_module) ssl_session_tickets on | off; ssl_session_tickets on; stream, server
ssl_session_timeout (ngx_http_ssl_module) ssl_session_timeout time; ssl_session_timeout 5m; http, server
ssl_session_timeout (ngx_mail_ssl_module) ssl_session_timeout time; ssl_session_timeout 5m; mail, server
ssl_session_timeout (ngx_stream_ssl_module) ssl_session_timeout time; ssl_session_timeout 5m; stream, server
ssl_stapling ssl_stapling on | off; ssl_stapling off; http, server
ssl_stapling_file ssl_stapling_file file; - http, server
ssl_stapling_responder ssl_stapling_responder url; - http, server
ssl_stapling_verify ssl_stapling_verify on | off;  ssl_stapling_verify off; http, server
ssl_trusted_certificate (ngx_http_ssl_module) ssl_trusted_certificate file; - http, server
ssl_trusted_certificate (ngx_mail_ssl_module) ssl_trusted_certificate file; - mail, server
ssl_trusted_certificate (ngx_stream_ssl_module) ssl_trusted_certificate file; - stream, server
ssl_verify_client (ngx_http_ssl_module) ssl_verify_client on | off | optional | optional_no_ca; ssl_verify_client off; mail, server
ssl_verify_client (ngx_http_ssl_module) ssl_verify_client on | off | optional | optional_no_ca; ssl_verify_client off; http, server
ssl_verify_client (ngx_stream_ssl_module) ssl_verify_client on | off | optional | optional_no_ca; ssl_verify_client off; stream, server
ssl_verify_depth (ngx_http_ssl_module) ssl_verify_depth number; ssl_verify_depth 1; http, server
ssl_verify_depth (ngx_mail_ssl_module) ssl_verify_depth number; ssl_verify_depth 1; mail, server
ssl_verify_depth (ngx_stream_ssl_module) ssl_verify_depth number; ssl_verify_depth 1; stream, server
Starttls starttls on | off | only; starttls off; mail, server
state (ngx_http_upstream_module) state file; - Upstream
state (ngx_stream_upstream_module) state file; - Upstream
Status status; - Location
status_format status_format json; status_format jsonp [callback]; status_format json; http, server, location
status_zone (ngx_http_api_module) status_zone zone; - Server
status_zone (ngx_http_status_module) status_zone zone; - Server
Sticky sticky cookie name [expires=time] [domain=domain] [httponly] [secure] [path=path]; sticky route $variable ...; sticky learn create=$variable lookup=$variable zone=name:size [timeout=time] [header] [sync]; - Upstream
sticky_cookie_insert sticky_cookie_insert name [expires=time] [domain=domain] [path=path]; - Upstream
Stream stream { ... } - Main
stub_status stub_status; - server, location
sub_filter sub_filter string replacement; - http, server, location
sub_filter_last_modified sub_filter_last_modified on | off; sub_filter_last_modified off; http, server, location
sub_filter_once sub_filter_last_modified on | off; sub_filter_last_modified off; http, server, location
sub_filter_types sub_filter_last_modified on | off; sub_filter_last_modified off; http, server, location
subrequest_output_buffer_size subrequest_output_buffer_size size; subrequest_output_buffer_size 4k|8k; http, server, location
tcp_nodelay (ngx_http_core_module) tcp_nodelay on | off; tcp_nodelay on; http, server, location
tcp_nodelay (ngx_stream_core_module) tcp_nodelay on | off; tcp_nodelay on; stream, server
tcp_nopush tcp_nopush on | off; tcp_nopush off; http, server, location
thread_pool thread_pool name threads=number [max_queue=number]; thread_pool default threads=32 max_queue=65536; Main
Timeout timeout time; timeout 60s; mail, server
timer_resolution timer_resolution interval; - Main
try_files try_files file ... uri; try_files file ... =code; - server, location
Types types { ... } types { text/html  html; image/gif  gif; image/jpeg jpg; } http, server, location
types_hash_bucket_size types_hash_bucket_size size; types_hash_bucket_size 64; http, server, location
types_hash_max_size types_hash_max_size size; types_hash_max_size 1024; http, server, location
underscores_in_headers underscores_in_headers on | off; underscores_in_headers off; http, server
uninitialized_variable_warn uninitialized_variable_warn on | off; uninitialized_variable_warn on; http, server, location, if
upstream (ngx_http_upstream_module) upstream name { ... } - http
upstream (ngx_stream_upstream_module) upstream name { ... } - Stream
upstream_conf upstream_conf; - Location
use use method; - Events
User user user [group]; user nobody nobody; Main
Userid userid on | v1 | log | off; userid off; http, server, location
userid_domain userid_domain name | none; userid_domain none; http, server, location
userid_expires userid_expires time | max | off; userid_expires off; http, server, location
userid_mark userid_mark letter | digit | = | off; userid_mark off; http, server, location
userid_name userid_name name; userid_name uid; http, server, location
userid_p3p userid_p3p string | none; userid_p3p none; http, server, location
userid_path userid_path path; userid_path /; http, server, location
userid_service userid_service number; userid_service IP address of the server; http, server, location
uwsgi_bind uwsgi_bind address [transparent] | off; - http, server, location
uwsgi_buffer_size uwsgi_buffer_size size; uwsgi_buffer_size 4k|8k; http, server, location
uwsgi_buffering uwsgi_buffering on | off; uwsgi_buffering on; http, server, location
uwsgi_buffers uwsgi_buffers number size; uwsgi_buffers 8 4k|8k; http, server, location
uwsgi_busy_buffers_size uwsgi_busy_buffers_size size; uwsgi_busy_buffers_size 8k|16k; http, server, location
uwsgi_cache uwsgi_cache zone | off; uwsgi_cache off; http, server, location
uwsgi_cache_background_update uwsgi_cache_background_update on | off; uwsgi_cache_background_update off; http, server, location
uwsgi_cache_bypass uwsgi_cache_bypass string ...; - http, server, location
uwsgi_cache_key uwsgi_cache_key string; - http, server, location
uwsgi_cache_lock uwsgi_cache_lock on | off; uwsgi_cache_lock off; http, server, location
uwsgi_cache_lock_age uwsgi_cache_lock_age time; uwsgi_cache_lock_age 5s; http, server, location
uwsgi_cache_lock_timeout uwsgi_cache_lock_timeout time; uwsgi_cache_lock_timeout 5s; http, server, location
uwsgi_cache_max_range_offset uwsgi_cache_max_range_offset number; - http, server, location
uwsgi_cache_methods uwsgi_cache_methods GET | HEAD | POST ...; uwsgi_cache_methods GET HEAD; http, server, location
uwsgi_cache_min_uses uwsgi_cache_min_uses number; uwsgi_cache_min_uses 1; http, server, location
uwsgi_cache_path uwsgi_cache_path path [levels=levels] [use_temp_path=on|off] keys_zone=name:size [inactive=time] [max_size=size] [manager_files=number] [manager_sleep=time] [manager_threshold=time] [loader_files=number] [loader_sleep=time] [loader_threshold=time] [purger=on|off] [purger_files=number] [purger_sleep=time] [purger_threshold=time]; - http
uwsgi_cache_purge uwsgi_cache_purge string ...; - uwsgi_cache_purge string ...;
uwsgi_cache_revalidate uwsgi_cache_revalidate on | off; uwsgi_cache_revalidate off; http, server, location
uwsgi_cache_use_stale uwsgi_cache_use_stale error | timeout | invalid_header | updating | http_500 | http_503 | http_403 | http_404 | http_429 | off ...; uwsgi_cache_use_stale off; http, server, location
uwsgi_cache_valid uwsgi_cache_valid [code ...] time; - http, server, location
uwsgi_connect_timeout uwsgi_connect_timeout time; uwsgi_connect_timeout 60s; http, server, location
uwsgi_force_ranges uwsgi_force_ranges on | off; uwsgi_force_ranges off; http, server, location
uwsgi_hide_header uwsgi_hide_header field; - http, server, location
uwsgi_ignore_client_abort uwsgi_ignore_client_abort on | off; uwsgi_ignore_client_abort off; http, server, location
uwsgi_ignore_headers uwsgi_ignore_headers field ...; - http, server, location
uwsgi_intercept_errors uwsgi_intercept_errors on | off; uwsgi_intercept_errors off; http, server, location
uwsgi_limit_rate uwsgi_limit_rate rate; uwsgi_limit_rate 0; http, server, location
uwsgi_max_temp_file_size uwsgi_max_temp_file_size size; uwsgi_max_temp_file_size 1024m; http, server, location
uwsgi_modifier1 uwsgi_modifier1 number; uwsgi_modifier1 0; http, server, location
uwsgi_modifier2 uwsgi_modifier2 number; uwsgi_modifier2 0; http, server, location
uwsgi_next_upstream uwsgi_next_upstream error | timeout | invalid_header | http_500 | http_503 | http_403 | http_404 | http_429 | non_idempotent | off ...; uwsgi_next_upstream error timeout; http, server, location
uwsgi_next_upstream_timeout uwsgi_next_upstream_timeout time; uwsgi_next_upstream_timeout 0; http, server, location
uwsgi_next_upstream_tries uwsgi_next_upstream_tries number; uwsgi_next_upstream_tries 0; http, server, location
uwsgi_no_cache uwsgi_no_cache string ...; - http, server, location
uwsgi_param uwsgi_param parameter value [if_not_empty]; - http, server, location
uwsgi_pass uwsgi_pass [protocol://]address; - location, if in location
uwsgi_pass_header uwsgi_pass_header field; - http, server, location
uwsgi_pass_request_body uwsgi_pass_request_body on | off; uwsgi_pass_request_body on; http, server, location
uwsgi_pass_request_headers uwsgi_pass_request_headers on | off; uwsgi_pass_request_headers on; http, server, location
uwsgi_read_timeout uwsgi_read_timeout time; uwsgi_read_timeout 60s; http, server, location
uwsgi_request_buffering uwsgi_request_buffering o uwsgi_request_buffering on; http, server, location
uwsgi_send_timeout uwsgi_send_timeout time; uwsgi_send_timeout 60s; http, server, location
uwsgi_socket_keepalive uwsgi_socket_keepalive on | off; uwsgi_socket_keepalive off; http, server, location
uwsgi_ssl_certificate uwsgi_ssl_certificate file; - http, server, location
uwsgi_ssl_certificate_key uwsgi_ssl_certificate_key file; - http, server, location
uwsgi_ssl_ciphers uwsgi_ssl_ciphers ciphers; uwsgi_ssl_ciphers DEFAULT; http, server, location
uwsgi_ssl_crl uwsgi_ssl_crl file; - http, server, location
uwsgi_ssl_name uwsgi_ssl_name name; uwsgi_ssl_name host from uwsgi_pass; http, server, location
uwsgi_ssl_password_file uwsgi_ssl_password_file file; - http, server, location
uwsgi_ssl_protocols uwsgi_ssl_protocols [SSLv2] [SSLv3] [TLSv1] [TLSv1.1] [TLSv1.2] [TLSv1.3]; uwsgi_ssl_protocols TLSv1 TLSv1.1 TLSv1.2; http, server, location
uwsgi_ssl_server_name uwsgi_ssl_server_name on | off; uwsgi_ssl_server_name off; http, server, location
uwsgi_ssl_session_reuse uwsgi_ssl_session_reuse on | off; uwsgi_ssl_session_reuse on; http, server, location
uwsgi_ssl_trusted_certificate uwsgi_ssl_trusted_certificate file; - http, server, location
uwsgi_ssl_verify uwsgi_ssl_verify on | off; uwsgi_ssl_verify off; http, server, location
uwsgi_ssl_verify_depth uwsgi_ssl_verify_depth number; uwsgi_ssl_verify_depth 1; http, server, location
uwsgi_store uwsgi_store on | off | string; uwsgi_store off; http, server, location
uwsgi_store_access uwsgi_store_access users:permissions ...; uwsgi_store_access user:rw; http, server, location
uwsgi_temp_file_write_size uwsgi_temp_file_write_size size; uwsgi_temp_file_write_size 8k|16k; http, server, location
uwsgi_temp_path uwsgi_temp_file_write_size size; uwsgi_temp_file_write_size 8k|16k; http, server, location
valid_referers valid_referers none | blocked | server_names | string ...; - server, location
variables_hash_bucket_size (ngx_http_core_module) variables_hash_bucket_size size; variables_hash_bucket_size 64; http
variables_hash_bucket_size (ngx_stream_core_module) variables_hash_bucket_size size; variables_hash_bucket_size 64; Stream
variables_hash_max_size (ngx_http_core_module) variables_hash_max_size size; variables_hash_max_size 1024; http
variables_hash_max_size (ngx_stream_core_module) variables_hash_max_size size; variables_hash_max_size 1024; Stream
worker_aio_requests worker_aio_requests number; worker_aio_requests 32; Events
worker_connections worker_connections number; worker_connections 512; Events
worker_cpu_affinity worker_cpu_affinity cpumask ...; worker_cpu_affinity auto [cpumask]; - Main
worker_priority worker_priority number; worker_priority 0; Main
worker_processes worker_processes number | auto; worker_processes 1; Main
worker_rlimit_core worker_rlimit_core size; - Main
worker_rlimit_nofile worker_rlimit_nofile number; - Main
worker_shutdown_timeout worker_shutdown_timeout time; - Main
working_directory working_directory directory; - Main
Xclient xclient on | off; xclient on; mail, server
xml_entities xml_entities path; - http, server, location
xslt_last_modified xslt_last_modified on | off; xslt_last_modified off; http, server, location
xslt_param xslt_param parameter value; - http, server, location
xslt_string_param xslt_string_param parameter value; - http, server, location
xslt_stylesheet xslt_stylesheet stylesheet [parameter=value ...]; - Location
xslt_types xslt_types mime-type ...; xslt_types text/xml; http, server, location
zone (ngx_http_upstream_module) zone name [size]; - Upstream
zone (ngx_stream_upstream_module) zone name [size]; - Upstream
zone_sync zone_sync; - Server
zone_sync_buffers zone_sync_buffers number size; zone_sync_buffers 8 4k|8k; stream, server
zone_sync_connect_retry_interval zone_sync_connect_retry_interval time; zone_sync_connect_retry_interval 1s; stream, server
zone_sync_connect_timeout zone_sync_connect_timeout time; zone_sync_connect_timeout 5s; stream, server
zone_sync_interval zone_sync_interval time; zone_sync_interval 1s; stream, server
zone_sync_recv_buffer_size zone_sync_recv_buffer_size size; zone_sync_recv_buffer_size 4k|8k; stream, server
zone_sync_server zone_sync_server address [resolve]; - Server
zone_sync_ssl zone_sync_ssl on | off; zone_sync_ssl off; stream, server
zone_sync_ssl_certificate zone_sync_ssl_certificate file; - stream, server
zone_sync_ssl_certificate_key zone_sync_ssl_certificate_key file; - stream, server
zone_sync_ssl_ciphers zone_sync_ssl_ciphers ciphers; zone_sync_ssl_ciphers DEFAULT; stream, server
zone_sync_ssl_crl zone_sync_ssl_crl file; - stream, server
zone_sync_ssl_name zone_sync_ssl_name name; zone_sync_ssl_name host from zone_sync_server; stream, server
zone_sync_ssl_password_file zone_sync_ssl_password_file file; - stream, server
zone_sync_ssl_protocols zone_sync_ssl_protocols [SSLv2] [SSLv3] [TLSv1] [TLSv1.1] [TLSv1.2] [TLSv1.3]; zone_sync_ssl_protocols TLSv1 TLSv1.1 TLSv1.2; stream, server
zone_sync_ssl_server_name zone_sync_ssl_server_name on | off; zone_sync_ssl_server_name off; stream, server
zone_sync_ssl_trusted_certificate zone_sync_ssl_trusted_certificate file; - stream, server
zone_sync_ssl_verify zone_sync_ssl_verify on | off; zone_sync_ssl_verify off; stream, server
zone_sync_ssl_verify_depth zone_sync_ssl_verify_depth number; zone_sync_ssl_verify_depth 1; stream, server
zone_sync_timeout zone_sync_timeout timeout; zone_sync_timeout 5s; stream, server

Next TopicNGINX Variables




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA