Mercurial > hg > nginx-site
changeset 2983:67dd348c9757
Documented new global nginx properties in njs Reference.
The following properties were added: ngx.build, ngx.conf_file_path,
ngx.error_log_path, ngx.prefix, ngx.version, ngx.version_number.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Thu, 01 Jun 2023 17:12:18 +0100 |
parents | 02889d1bab78 |
children | cc475ba7d406 |
files | xml/en/docs/configure.xml xml/en/docs/njs/reference.xml xml/ru/docs/configure.xml |
diffstat | 3 files changed, 60 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/xml/en/docs/configure.xml +++ b/xml/en/docs/configure.xml @@ -8,7 +8,7 @@ <article name="Building nginx from Sources" link="/en/docs/configure.html" lang="en" - rev="21"> + rev="22"> <section> @@ -68,7 +68,7 @@ defines a directory where nginx dynamic By default the <path><value>prefix</value>/modules</path> directory is used. </tag-desc> -<tag-name> +<tag-name id="conf_path"> <literal>--conf-path=<value>path</value></literal> </tag-name> <tag-desc>
--- a/xml/en/docs/njs/reference.xml +++ b/xml/en/docs/njs/reference.xml @@ -9,7 +9,7 @@ <article name="Reference" link="/en/docs/njs/reference.html" lang="en" - rev="106"> + rev="107"> <section id="summary"> @@ -1152,14 +1152,37 @@ The <literal>ngx</literal> global object since <link doc="changes.xml" id="njs0.5.0">0.5.0</link>. <list type="tag"> +<tag-name id="ngx_build"><literal>ngx.build</literal></tag-name> +<tag-desc> +a string containing an optional nginx build name, corresponds to the +<link doc="../configure.xml" id="build"><literal>--build=name</literal></link> +argument +of the <link doc="../configure.xml">configure</link> script, +by default is <literal>""</literal> +(<link doc="changes.xml" id="njs0.8.0">0.8.0</link>) +</tag-desc> + +<tag-name id="ngx_conf_file_path"><literal>ngx.conf_file_path</literal></tag-name> +<tag-desc> +a string containing the file path to current nginx configuration file +(<link doc="changes.xml" id="njs0.8.0">0.8.0</link>) +</tag-desc> + <tag-name id="ngx_conf_prefix"><literal>ngx.conf_prefix</literal></tag-name> <tag-desc> a string containing the file path to -<link doc="../configure.xml" id="prefix">nginx configuration prefix</link>— +<link doc="../configure.xml" id="conf_path">nginx configuration prefix</link>— the directory where nginx is currently looking for configuration (<link doc="changes.xml" id="njs0.7.8">0.7.8</link>) </tag-desc> +<tag-name id="ngx_error_log_path"><literal>ngx.error_log_path</literal></tag-name> +<tag-desc> +a string containing the file path to the current +<link doc="../ngx_core_module.xml" id="error_log">error log</link> file +(<link doc="changes.xml" id="njs0.8.0">0.8.0</link>) +</tag-desc> + <tag-name id="ngx_fetch"><literal>ngx.fetch(<value>resource</value>, [<value>options</value>])</literal></tag-name> <tag-desc> @@ -1240,7 +1263,7 @@ r.return(200, body); <tag-name id="ngx_log"><literal>ngx.log</literal>(<value>level</value>, <value>message</value>)</tag-name> <tag-desc> -Writes a message to the error log with the specified level of logging. +writes a message to the error log with the specified level of logging. The <value>level</value> parameter specifies one of the log levels, the <value>message</value> parameter can be a string or Buffer. The following log levels can be specified: @@ -1257,6 +1280,36 @@ only first 2048 bytes of the string can </para> </tag-desc> +<tag-name id="ngx_prefix"><literal>ngx.prefix</literal></tag-name> +<tag-desc> +a string containing the file path to +<link doc="../configure.xml" id="prefix">nginx prefix</link>— +a directory that keeps server files +(<link doc="changes.xml" id="njs0.8.0">0.8.0</link>) +</tag-desc> + +<tag-name id="ngx_version"><literal>ngx.version</literal></tag-name> +<tag-desc> +a string containing nginx version, +for example: <literal>1.25.0</literal> +(<link doc="changes.xml" id="njs0.8.0">0.8.0</link>) +</tag-desc> + +<tag-name id="ngx_version_number"><literal>ngx.version_number</literal></tag-name> +<tag-desc> +a number containing nginx version, +for example: <literal>1025000</literal> +(<link doc="changes.xml" id="njs0.8.0">0.8.0</link>) +</tag-desc> + +<tag-name id="ngx_worker_id"><literal>ngx.worker_id</literal></tag-name> +<tag-desc> +a number that corresponds to nginx internal worker id, +the value is between <literal>0</literal> and the value specified in the +<link doc="../ngx_core_module.xml" id="worker_processes"/> directive +(<link doc="changes.xml" id="njs0.8.0">0.8.0</link>) +</tag-desc> + </list> </para>
--- a/xml/ru/docs/configure.xml +++ b/xml/ru/docs/configure.xml @@ -8,7 +8,7 @@ <article name="Сборка nginx из исходных файлов" link="/ru/docs/configure.html" lang="ru" - rev="21"> + rev="22"> <section> @@ -68,7 +68,7 @@ По умолчанию используется каталог <path><value>префикс</value>/modules</path>. </tag-desc> -<tag-name> +<tag-name id="conf_path"> <literal>--conf-path=<value>путь</value></literal> </tag-name> <tag-desc>