Scalable, flexible pub/sub server for the modern web
151 — Every core and module directive — syntax, defaults, contexts, and real configuration examples.
nchan_access_control_allow_credentials
The nchan_access_control_allow_credentials directive controls whether to allow…
httpserverlocation
nchan_access_control_allow_origin
The `nchan_access_control_allow_origin` directive sets the…
httpserverlocation
nchan_authorize_request
The nchan_authorize_request directive is used to control access to Nchan…
serverlocationif in location
nchan_benchmark
The `nchan_benchmark` directive enables benchmarking tools for testing and…
location
nchan_benchmark_channels
The nchan_benchmark_channels directive sets the number of channels to simulate…
location
nchan_benchmark_message_padding_bytes
The nchan_benchmark_message_padding_bytes directive sets a fixed byte size to…
location
nchan_benchmark_messages_per_channel_per_minute
The directive `nchan_benchmark_messages_per_channel_per_minute` sets a…
location
nchan_benchmark_publisher_distribution
The nchan_benchmark_publisher_distribution directive controls the distribution…
location
nchan_benchmark_subscriber_distribution
The nchan_benchmark_subscriber_distribution directive configures how…
location
nchan_benchmark_subscribers_per_channel
The `nchan_benchmark_subscribers_per_channel` directive sets the maximum…
location
nchan_benchmark_time
The `nchan_benchmark_time` directive configures the time interval for…
location
nchan_channel_event_string
The `nchan_channel_event_string` directive allows you to define a custom event…
serverlocationif in location
nchan_channel_events_channel_id
The nchan_channel_events_channel_id directive specifies the identifier for a…
serverlocationif in location
nchan_channel_group
The nchan_channel_group directive defines a unique group identifier for…
serverlocationif in location
nchan_channel_group_accounting
The `nchan_channel_group_accounting` directive enables accounting for resource…
serverlocation
nchan_channel_id
The nchan_channel_id directive defines the identifier for a Pub/Sub channel in…
serverlocationif in location
nchan_channel_id_split_delimiter
The `nchan_channel_id_split_delimiter` directive specifies the delimiter used…
serverlocationif in location
nchan_channel_timeout
Sets the timeout for Nchan channels, allowing inactive channels to be…
httpserverlocation
nchan_deflate_message_for_websocket
The nchan_deflate_message_for_websocket directive enables message compression…
serverlocation
nchan_eventsource_event
The `nchan_eventsource_event` directive specifies the event data for…
serverlocationif in location
nchan_eventsource_ping_comment
The `nchan_eventsource_ping_comment` directive sets an optional ping comment…
serverlocationif in location
nchan_eventsource_ping_data
The `nchan_eventsource_ping_data` directive specifies the data payload sent…
serverlocationif in location
nchan_eventsource_ping_event
Sets the ping event interval for EventSource connections in Nginx's Nchan…
serverlocationif in location
nchan_eventsource_ping_interval
Sets the interval for sending ping messages to clients using EventSource…
serverlocationif in location
nchan_group_location
The `nchan_group_location` directive defines a location block that specifies a…
location
nchan_group_max_channels
The `nchan_group_max_channels` directive sets a limit on the maximum number of…
location
nchan_group_max_messages
The `nchan_group_max_messages` directive limits the maximum number of messages…
location
nchan_group_max_messages_disk
The `nchan_group_max_messages_disk` directive limits the number of messages…
location
nchan_group_max_messages_memory
The `nchan_group_max_messages_memory` directive sets a limit on the maximum…
location
nchan_group_max_subscribers
Limits the maximum number of subscribers to a specific pub/sub channel in Nchan.
location
nchan_longpoll_multipart_response
The `nchan_longpoll_multipart_response` directive specifies whether to use…
serverlocationif in location
nchan_max_channel_id_length
Sets the maximum length for channel IDs used in the Nchan pub/sub module.
httpserverlocation
nchan_max_channel_subscribers
Sets the maximum number of subscribers that can connect to a given channel in…
httpserverlocation
nchan_max_reserved_memory
Sets the maximum amount of memory that Nchan will allocate for reserved…
http
nchan_message_buffer_length
Sets the maximum number of messages to retain in the Nchan message buffer.
httpserverlocation
nchan_message_max_buffer_length
The `nchan_message_max_buffer_length` directive sets the maximum length of…
httpserverlocation
nchan_message_temp_path
The nchan_message_temp_path directive specifies the temporary file directory…
http
nchan_message_timeout
Sets the timeout duration for messages in the Nchan pub/sub server.
httpserverlocation
nchan_permessage_deflate_compression_level
Sets the gzip compression level for WebSocket messages in NCHAN.
http
nchan_permessage_deflate_compression_memlevel
This directive sets the memory level parameter for per-message deflate…
http
nchan_permessage_deflate_compression_strategy
Configures the compression strategy for WebSocket messages in Nchan.
http
nchan_permessage_deflate_compression_window
The nchan_permessage_deflate_compression_window directive configures the…
http
nchan_pub_channel_id
The 'nchan_pub_channel_id' directive specifies the identifier of the…
serverlocationif in location
nchan_publisher
The `nchan_publisher` directive defines the channel identifier for publishing…
serverlocationif in location
nchan_publisher_channel_id
The `nchan_publisher_channel_id` directive sets the identifier for channels…
serverlocationif in location
nchan_publisher_location
Defines the location for publishing messages in the NCHAN pub/sub system.
serverlocationif in location
nchan_publisher_upstream_request
The `nchan_publisher_upstream_request` directive specifies a URL which will be…
serverlocationif in location
nchan_pubsub
The `nchan_pubsub` directive enables and configures the publish/subscribe…
serverlocationif in location
nchan_pubsub_channel_id
The `nchan_pubsub_channel_id` directive defines the unique identifier for a…
serverlocationif in location
nchan_pubsub_location
The `nchan_pubsub_location` directive configures a location block for…
serverlocationif in location
nchan_redis_accurate_subscriber_count
The 'nchan_redis_accurate_subscriber_count' directive configures accurate…
upstream
nchan_redis_cluster_check_interval
Sets the interval for checking the health of Redis nodes in an Nchan Redis…
upstream
nchan_redis_cluster_check_interval_backoff
The `nchan_redis_cluster_check_interval_backoff` directive controls the…
upstream
nchan_redis_cluster_check_interval_jitter
Configures the jitter added to the Redis cluster health check interval.
upstream
nchan_redis_cluster_check_interval_max
Sets the maximum interval for Redis cluster health checks in Nchan.
upstream
nchan_redis_cluster_check_interval_min
Sets the minimum interval for health checks in a Redis cluster within the…
upstream
nchan_redis_cluster_connect_timeout
Sets the connection timeout for Redis cluster connections in Nchan.
upstream
nchan_redis_cluster_max_failing_time
The `nchan_redis_cluster_max_failing_time` directive sets the maximum allowed…
upstream
nchan_redis_cluster_recovery_delay
Sets a delay for recovery of Nchan subscribers in a Redis cluster when a…
upstream
nchan_redis_cluster_recovery_delay_backoff
Sets the backoff delay for Redis cluster recovery attempts when a node becomes…
upstream
nchan_redis_cluster_recovery_delay_jitter
Controls the jitter delay during Redis cluster recovery for Nchan pub/sub…
upstream
nchan_redis_cluster_recovery_delay_max
Limits the maximum delay for recovery after a Redis cluster failure in the…
upstream
nchan_redis_cluster_recovery_delay_min
The nchan_redis_cluster_recovery_delay_min directive specifies the minimum…
upstream
nchan_redis_command_timeout
The nchan_redis_command_timeout directive sets the timeout for commands sent…
upstream
nchan_redis_connect_timeout
The `nchan_redis_connect_timeout` directive specifies the timeout duration for…
upstream
nchan_redis_discovered_ip_range_blacklist
The nchan_redis_discovered_ip_range_blacklist directive defines a range of IP…
upstream
nchan_redis_fakesub_timer_interval
The `nchan_redis_fakesub_timer_interval` directive sets the interval for…
http
nchan_redis_idle_channel_cache_timeout
Sets the timeout for caching idle channels in Redis used by Nchan.
httpserverlocation
nchan_redis_idle_channel_keepalive_backoff
The `nchan_redis_idle_channel_keepalive_backoff` directive controls the…
upstream
nchan_redis_idle_channel_keepalive_jitter
The nchan_redis_idle_channel_keepalive_jitter directive introduces randomness…
upstream
nchan_redis_idle_channel_keepalive_max
Configures the maximum idle duration for Redis channels in Nchan for greater…
upstream
nchan_redis_idle_channel_keepalive_min
The nchan_redis_idle_channel_keepalive_min directive sets the minimum…
upstream
nchan_redis_idle_channel_keepalive_safety_margin
The `nchan_redis_idle_channel_keepalive_safety_margin` directive defines a…
upstream
nchan_redis_load_scripts_unconditionally
The `nchan_redis_load_scripts_unconditionally` directive ensures that Lua…
upstream
nchan_redis_namespace
The `nchan_redis_namespace` directive defines a namespace for Redis to…
httpserverlocation
nchan_redis_node_connect_timeout
Sets the timeout duration for connecting to a Redis node in Nchan's pub/sub…
upstream
nchan_redis_nostore_fastpublish
The `nchan_redis_nostore_fastpublish` directive configures Nchan to allow fast…
httpserverupstream
nchan_redis_optimize_target
The `nchan_redis_optimize_target` directive specifies the optimization target…
upstream
nchan_redis_pass
The `nchan_redis_pass` directive routes published messages to a Redis backend…
httpserverlocation
nchan_redis_pass_inheritable
The `nchan_redis_pass_inheritable` directive makes the Redis connection…
httpserverlocation
nchan_redis_password
The 'nchan_redis_password' directive specifies the password required to…
upstream
nchan_redis_ping_interval
The `nchan_redis_ping_interval` directive sets the interval at which Nchan…
httpserverlocation
nchan_redis_publish_msgpacked_max_size
The directive 'nchan_redis_publish_msgpacked_max_size' sets the maximum size…
http
nchan_redis_reconnect_delay
Sets the delay in seconds for reconnecting to Redis when a connection is lost…
upstream
nchan_redis_reconnect_delay_backoff
Controls the backoff delay when reconnecting to Redis for Nchan pub/sub…
upstream
nchan_redis_reconnect_delay_jitter
The `nchan_redis_reconnect_delay_jitter` directive introduces a random jitter…
upstream
nchan_redis_reconnect_delay_max
Sets the maximum delay for reconnection attempts to Redis when using Nchan.
upstream
nchan_redis_reconnect_delay_min
Sets the minimum delay before Nchan retries a connection to Redis in case of…
upstream
nchan_redis_retry_commands
The `nchan_redis_retry_commands` directive specifies the number of times Nchan…
upstream
nchan_redis_retry_commands_max_wait
The 'nchan_redis_retry_commands_max_wait' directive sets the maximum wait time…
upstream
nchan_redis_server
Configures an NGINX server to connect to a Redis instance for message…
upstream
nchan_redis_ssl
The nchan_redis_ssl directive configures SSL options for connections to a…
upstream
nchan_redis_ssl_ciphers
Sets the SSL cipher suite for Redis connections in Nchan.
upstream
nchan_redis_ssl_client_certificate
The `nchan_redis_ssl_client_certificate` directive specifies the SSL client…
upstream
nchan_redis_ssl_client_certificate_key
The `nchan_redis_ssl_client_certificate_key` directive specifies the path to…
upstream
nchan_redis_ssl_server_name
Sets the SSL server name for Redis connections used by Nchan.
upstream
nchan_redis_ssl_trusted_certificate
Defines a trusted SSL certificate for Redis connections in a Nchan pub/sub…
upstream
nchan_redis_ssl_trusted_certificate_path
Specifies the path to a trusted SSL certificate for Nchan when connecting to…
upstream
nchan_redis_ssl_verify_certificate
The `nchan_redis_ssl_verify_certificate` directive enables SSL certificate…
upstream
nchan_redis_storage_mode
The 'nchan_redis_storage_mode' directive configures the data storage mode for…
httpserverlocation
nchan_redis_subscribe_weights
The 'nchan_redis_subscribe_weights' directive allows you to specify weight…
upstream
nchan_redis_tls
The nchan_redis_tls directive configures TLS for Redis connections used in the…
upstream
nchan_redis_tls_ciphers
The 'nchan_redis_tls_ciphers' directive specifies the list of allowed TLS…
upstream
nchan_redis_tls_client_certificate
The `nchan_redis_tls_client_certificate` directive specifies the TLS client…
upstream
nchan_redis_tls_server_name
The `nchan_redis_tls_server_name` directive sets the server name used for the…
upstream
nchan_redis_tls_trusted_certificate
The `nchan_redis_tls_trusted_certificate` directive specifies the trusted CA…
upstream
nchan_redis_tls_trusted_certificate_path
Specifies the path to the trusted TLS certificate for establishing secure…
upstream
nchan_redis_tls_verify_certificate
Controls whether to verify SSL certificates when communicating with Redis over…
upstream
nchan_redis_upstream_stats
The `nchan_redis_upstream_stats` directive configures the reporting of…
serverlocation
nchan_redis_upstream_stats_disconnected_timeout
Sets the timeout for a disconnected Nchan Redis upstream server in seconds.
upstream
nchan_redis_upstream_stats_enabled
Enables statistics gathering for Redis upstreams used in the Nchan module.
upstream
nchan_redis_url
The nchan_redis_url directive configures the Redis server URL for Nchan's…
httpserverlocation
nchan_redis_username
The `nchan_redis_username` directive specifies the username for authenticating…
upstream
nchan_redis_wait_after_connecting
Configures the wait time after connecting to Redis in Nchan's pub/sub…
httpserverlocation
nchan_shared_memory_size
The `nchan_shared_memory_size` directive configures the amount of shared…
http
nchan_storage_engine
The `nchan_storage_engine` directive specifies the storage backend for the…
httpserverlocation
nchan_store_messages
The `nchan_store_messages` directive enables the storage of messages sent to a…
httpserverlocation
nchan_stub_status
The nchan_stub_status directive provides a way to expose status metrics for…
location
nchan_sub_channel_id
The `nchan_sub_channel_id` directive defines the channel identifiers for…
serverlocationif in location
nchan_subscribe_existing_channels_only
The `nchan_subscribe_existing_channels_only` directive restricts subscribers…
httpserverlocation
nchan_subscribe_request
The `nchan_subscribe_request` directive specifies how to handle subscription…
serverlocationif in location
nchan_subscriber
The `nchan_subscriber` directive specifies the channel ID for an Nchan…
serverlocationif in location
nchan_subscriber_channel_id
The `nchan_subscriber_channel_id` directive configures the channel identifier…
serverlocationif in location
nchan_subscriber_compound_etag_message_id
The `nchan_subscriber_compound_etag_message_id` directive is used to…
serverlocationif in location
nchan_subscriber_first_message
The `nchan_subscriber_first_message` directive configures the behavior of a…
serverlocationif in location
nchan_subscriber_http_raw_stream_separator
The `nchan_subscriber_http_raw_stream_separator` directive sets a custom…
serverlocationif in location
nchan_subscriber_info
The `nchan_subscriber_info` directive is used to configure the handling of…
location
nchan_subscriber_info_string
The `nchan_subscriber_info_string` directive configures a custom string to be…
serverlocation
nchan_subscriber_last_message_id
The nchan_subscriber_last_message_id directive allows Nchan subscribers to…
serverlocationif in location
nchan_subscriber_location
The nchan_subscriber_location directive defines a location block for handling…
serverlocationif in location
nchan_subscriber_message_id_custom_etag_header
Defines a custom ETag header for subscriber messages in NGINX's Nchan module.
serverlocationif in location
nchan_subscriber_timeout
The nchan_subscriber_timeout directive sets the maximum amount of time a…
httpserverlocation
nchan_unsubscribe_request
The `nchan_unsubscribe_request` directive specifies the request handling for…
serverlocationif in location
nchan_use_redis
The `nchan_use_redis` directive enables the use of Redis as a storage backend…
httpserverlocation
nchan_websocket_client_heartbeat
The nchan_websocket_client_heartbeat directive defines the interval for…
serverlocationif in location
nchan_websocket_ping_interval
The 'nchan_websocket_ping_interval' directive specifies the interval at which…
serverlocationif in location
push_authorized_channels_only
The `push_authorized_channels_only` directive restricts subscribers to only…
httpserverlocation
push_channel_group
The `push_channel_group` directive defines a named group for managing multiple…
serverlocationif in location
push_channel_timeout
The `push_channel_timeout` directive sets the maximum duration for a push…
httpserverlocation
push_max_channel_id_length
The `push_max_channel_id_length` directive sets the maximum allowable length…
httpserverlocation
push_max_channel_subscribers
Limits the maximum number of subscribers for a channel in Nchan pub/sub…
httpserverlocation
push_max_message_buffer_length
The `push_max_message_buffer_length` directive sets the maximum buffer length…
httpserverlocation
push_max_reserved_memory
The `push_max_reserved_memory` directive sets the maximum amount of memory…
http
push_message_buffer_length
Sets the maximum number of messages that can be buffered for each pub/sub…
httpserverlocation
push_message_timeout
The `push_message_timeout` directive configures the maximum duration a message…
httpserverlocation
push_min_message_buffer_length
Sets the minimum buffer length for messages in Nchan's pub/sub implementation.
serverlocationif in location
push_publisher
The `push_publisher` directive configures a location to handle HTTP requests…
serverlocationif in location
push_store_messages
The `push_store_messages` directive configures the storage behavior for…
httpserverlocation
push_subscriber
The `push_subscriber` directive configures a location block for subscribing to…
serverlocationif in location
push_subscriber_concurrency
The `push_subscriber_concurrency` directive limits the number of concurrent…
serverlocationif in location
push_subscriber_timeout
The `push_subscriber_timeout` directive sets the maximum allowed idle time for…
httpserverlocation