Project: Tengine (Orchestration & Management / Service Proxy)
File: core.md

Syntax: force_exit exit_time; Default: Context: main force worker processes to exit after exit_time. The force_exit support is not enabled by default. You should compile it explicitly: ``` ./configure --with-force-exit ``` Note: Removed forceexit directive after the Tengine-2.3.0 version and use Nginx official `workershutdown_timeout` , detailed reference Syntax: worker_processes [num | auto] Default: worker_processes auto Context: main Set the number of worker processes. When set to 'auto', which is also the default behavior, Tengine will create the same number of worker processes as your CPUs. Syntax: master_env variable[=value]; Default: - Context: main If use `masterenv` directive to set `NGXDNSRESOLVEBACKUP_PATH` environment variable and dns cache will be enabled. When the dns server is unavailable, it's will use the last dns cache. For example `masterenv NGXDNSRESOLVEBACKUPPATH=/home/tengine/worker/dnscache/path`, the domain A record results will be saved to the file and path depends on `NGXDNSRESOLVEBACKUP_PATH`. Syntax: worker_cpu_affinity [mask1 mask2 mask3 ... | auto | off] Default: workercpuaffinity off Context: main Bind worker processes to the sets of CPUs. When set to 'auto', Tengine will automatically bind each worker process to a specific CPU. If the number of worker processes is larger than the number of your CPUs, then the rest of worker processes will be bond in descendant order. For example, if there are 8 CPUs in your system: When the process number set to 4, the binding bitmap will be: 10000000 01000000 00100000 00010000 When the process number set to 8, the binding bitmap will be: 10000000 01000000 00100000 00010000 00001000 00000100 00000010 00000001 When the process number set to 10, the binding bitmap will be: 10000000 01000000 00100000 00010000 00001000 00000100 00000010 00000001 10000000 01000000 When set to 'off', Tengine will disable the CPU affinity. Syntax: request_time_cache [on | off] Default: requesttimecache on Context: http, server, location When set to 'off', Tengine will get a more precise time on $requesttime, $requesttimemsec, $requesttime_usec because it does not use time

Syntax: log_empty_request [on | off] Default: logemptyrequest on Context: http, server, location When you specify it 'off', Tengine will not record any access log when a client issues a connection without any data being sent. By default, it's on. In the above case, it will print a 400 Bad Request message into the access log. Syntax: server_admin admin Default: none Context: http, server, location Specify the administrator's information, which will appear in a default 4xx/5xx error response when 'server_info' is turned on. Syntax: server_info on | off Default: server_info on Context: http, server, location Show up the server information in a default 4xx/5xx error response. The URL accessed by the user, the hostname serving the request, and the time are included. Syntax: server_tag off | customized_tag Default: none Context: http, server, location Specify the customized 'Server' header in the HTTP responses, for example, 'Apache/2.2.22', 'IIS 6.0', 'Lighttpd', etc. You could also suppress the 'Server' header by setting it to 'off'. Syntax: reuse_port on | off Default: reuse_port off Context: events turn on support for SO_REUSEPORT socket option. This option is supported since Linux 3.9. Note: Removed reuse_port directive after the Tengine-2.3.0 version and use the official reuseport of Nginx, detailed reference . Syntax: server_name name; Default: Context: server `servername` used in Stream module makes Tengine have the ability to listen same ip:port in multiply server blocks and. The connection will be attached to a certain server block by SNI extension in TLS. That means `servername` should be used with SSL offloading(using `ssl` after `listen`). The `server_name` support in Stream module is not enabled by default. You should compile it explicitly: ``` ./configure --with-stream_sni ``` Note: This feature is experimental. We will deprecate this feature if there is any conflict with similar feature of nginx official. Syntax: ssl_sni_force on | off Default: sslsniforce off Context: stream, server `sslsniforce` will determine whether the TLS handsheke is rejected or not if SNI is not matched with server name which we configure by `server_name` in Stream module. Note: Same note in `server_name` above.