Mercurial > hg > nginx-site
view xml/en/docs/ngx_core_module.xml @ 205:f743d1f4683a
Fixed wording.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Fri, 25 Nov 2011 13:45:14 +0000 |
parents | 05e58829de2e |
children | c4b33b07dcfe |
line wrap: on
line source
<?xml version="1.0"?> <!DOCTYPE module SYSTEM "../../../dtd/module.dtd"> <module name="Core functionality" link="/en/docs/ngx_core_module.html" lang="en"> <section id="example" name="Example Configuration"> <para> <example> user www www; worker_processes 2; error_log /var/log/nginx-error.log info; events { use kqueue; worker_connections 2048; } ... </example> </para> </section> <section id="directives" name="Directives"> <directive name="daemon"> <syntax><value>on</value> | <value>off</value></syntax> <default>on</default> <context>main</context> <para> Determines whether nginx should become a daemon. Mainly used during development. </para> </directive> <directive name="error_log"> <syntax> <argument>file</argument> [<value>debug</value> | <value>info</value> | <value>notice</value> | <value>warn</value> | <value>error</value> | <value>crit</value> | <value>alert</value> | <value>emerg</value>] </syntax> <default>logs/error.log error</default> <context>main</context> <context>http</context> <context>server</context> <context>location</context> <para> Configures logging. </para> <para> The first argument defines a file that will store the log. <!-- If filename is not absolute, it is prefixed with the prefix path. --> </para> <para> The second argument determines the level of logging. Log levels above are listed in the order of increasing severity. Setting a certain log level will cause all messages of the specified and more severe log levels to be logged. For example, the default level <value>error</value> will cause <value>error</value>, <value>crit</value>, <value>alert</value>, and <value>emerg</value> messages to be logged. <note> For <value>debug</value> logging to work, nginx needs to be configured with <code>--with-debug</code>. </note> </para> </directive> <directive name="env"> <syntax><argument>VAR</argument>[=<argument>VALUE</argument>]</syntax> <default>TZ</default> <context>main</context> <para> Allows to limit a set of environment variables, change their values, or create new environment variables, for the following cases: <list type="bullet"> <listitem> variable inheritance during a <link doc="control.xml" id="upgrade">live upgrade</link> of an executable file; </listitem> <listitem> use of variables by the module <link doc="http/ngx_http_perl_module.xml">ngx_http_perl_module</link>; </listitem> <listitem> use of variables by worker processes. Please bear in mind that controlling system libraries in this way is not always possible as it is not uncommon for libraries to check variables only during initialization, well before they can be set using this directive. An exception from this is an above mentioned <link doc="control.xml" id="upgrade">live upgrade</link> of an executable file. </listitem> </list> </para> <para> The TZ variable is always inherited and made available to the module <link doc="http/ngx_http_perl_module.xml">ngx_http_perl_module</link>, unless configured explicitly. </para> <para> Usage example: <example> env MALLOC_OPTIONS; env PERL5LIB=/data/site/modules; env OPENSSL_ALLOW_PROXY_CERTS=1; </example> </para> </directive> <directive name="include"> <syntax><argument>file</argument> | <argument>mask</argument></syntax> <default/> <context/> <para> Includes another <argument>file</argument>, or files matching the specified <argument>mask</argument>, into configuration. Included files should consist of syntactically correct directives and blocks. </para> <para> Usage example: <example> include mime.types; include vhosts/*.conf; </example> </para> </directive> <directive name="master_process"> <syntax><value>on</value> | <value>off</value></syntax> <default>on</default> <context>main</context> <para> Determines whether worker processes are started. This directive is intended for nginx developers. </para> </directive> <directive name="pid"> <syntax><argument>file</argument></syntax> <default>nginx.pid</default> <context>main</context> <para> Defines a <argument>file</argument> which will store the process ID of the main process. </para> </directive> <directive name="ssl_engine"> <syntax><argument>device</argument></syntax> <default/> <context>main</context> <para> Defines the name of the hardware SSL accelerator. </para> </directive> <directive name="timer_resolution"> <syntax><argument>interval</argument></syntax> <default/> <context>main</context> <para> Reduces timer resolution in worker processes, thus reducing the number of <c-func>gettimeofday</c-func> system calls made. By default, <c-func>gettimeofday</c-func> is called each time on receiving a kernel event. With reduced resolution, <c-func>gettimeofday</c-func> is only called once per specified <argument>interval</argument>. </para> <para> Example: <example> timer_resolution 100ms; </example> </para> <para> An internal implementation of interval depends on the method used: <list type="bullet"> <listitem> an <c-def>EVFILT_TIMER</c-def> filter if <value>kqueue</value> is used; </listitem> <listitem> <c-func>timer_create</c-func> if <value>eventport</value> is used; </listitem> <listitem> <c-func>setitimer</c-func> otherwise. </listitem> </list> </para> </directive> <directive name="user"> <syntax><argument>user</argument> [<argument>group</argument>]</syntax> <default>nobody nobody</default> <context>main</context> <para> Defines <argument>user</argument> and <argument>group</argument> credentials used by worker processes. If <argument>group</argument> is omitted, a group whose name equals that of <argument>user</argument> is used. </para> </directive> <directive name="worker_priority"> <syntax><argument>number</argument></syntax> <default>0</default> <context>main</context> <para> Defines a scheduling priority for worker processes like is done by the <command>nice</command> command: a negative <argument>number</argument> means higher priority. Allowed range normally varies from -20 to 20. </para> <para> Example: <example> worker_priority -10; </example> </para> </directive> <directive name="worker_processes"> <syntax><argument>number</argument></syntax> <default>1</default> <context>main</context> <para> Defines the number of worker processes. </para> </directive> <directive name="worker_rlimit_core"> <syntax><argument>size</argument></syntax> <default/> <context>main</context> <para> Changes the limit on the largest size of a core file (<c-def>RLIMIT_CORE</c-def>) for worker processes. Used to increase the limit without restarting the main process. </para> </directive> <directive name="worker_rlimit_nofile"> <syntax><argument>number</argument></syntax> <default/> <context>main</context> <para> Changes the limit on the maximum number of open files (<c-def>RLIMIT_NOFILE</c-def>) for worker processes. Used to increase the limit without restarting the main process. </para> </directive> <directive name="working_directory"> <syntax><argument>directory</argument></syntax> <default/> <context>main</context> <para> Defines a current working directory for a worker process. It is primarily used when writing a core-file, in which case a working process should have write permission for the specified directory. </para> </directive> </section> </module>