changeset 265:4d047c05b7ad

Revised the "nginx for Windows" article.
author Ruslan Ermilov <ru@nginx.com>
date Thu, 22 Dec 2011 09:07:37 +0000
parents 06b4c1f3149d
children c09d374c86c6
files xml/en/docs/windows.xml xml/ru/docs/windows.xml
diffstat 2 files changed, 164 insertions(+), 63 deletions(-) [+]
line wrap: on
line diff
--- a/xml/en/docs/windows.xml
+++ b/xml/en/docs/windows.xml
@@ -1,44 +1,44 @@
 <!DOCTYPE article SYSTEM "../../../dtd/article.dtd">
 
-<article name="nginx/Windows usage"
+<article name="nginx for Windows"
          link="/en/docs/windows.html"
          lang="en">
 
-
 <section>
 
 <para>
-nginx/Windows uses the native Win32 API (not the Cygwin emulation layer).
-Currently only the <i>select</i> method is used as a notification method,
-therefore you should not expect high performance and scalability.
-Because of this and some known issues nginx/Windows is considered
-as a <i>beta</i> version.
-There is almost full-functionality in nginx/Windows as compared
-with the Unix version,
-except XSLT filter, image filter, GeoIP module, and embedded Perl language.
+Version of nginx for Windows uses the native Win32 API (not the Cygwin emulation
+layer).
+Only the <c-func>select</c-func> request processing method is currently used,
+so high performance and scalability should not be expected.
+Due to this and some other known issues version of nginx for Windows
+is considered to be a <i>beta</i> version.
+At this time, it provides almost the same functionality as a UNIX version
+of nginx except for
+XSLT filter, image filter, GeoIP module, and embedded Perl language.
 </para>
 
 <para>
-To install nginx/Windows, you should <a href="/en/download.xml">download</a>
-the latest <development_version /> development version zipped file,
-since the development branch contains all known fixes,
-especially Windows related.
-Then you should unzip the file,
-go to the nginx-<development_version /> directory, and run nginx.
+To install nginx/Windows, <link doc="../download.xml">download</link>
+the latest development version distribution (<development_version/>),
+since the development branch of nginx contains all known fixes.
+Then unpack the distribution, go to the
+nginx-<development_version/>
+directory, and run <command>nginx</command>.
 Here is an example for the drive C: root directory:
 
 <programlisting>
 cd c:\
-unzip nginx-<development_version />.zip
-cd nginx-<development_version />
+unzip nginx-<development_version/>.zip
+cd nginx-<development_version/>
 start nginx
 </programlisting>
 
-You may run the <command>tasklist</command> command line utility
+Run the <command>tasklist</command> command-line utility
 to see nginx processes:
 
 <programlisting>
-C:\nginx-<development_version />&gt;tasklist /fi "imagename eq nginx.exe"
+C:\nginx-<development_version/>&gt;tasklist /fi "imagename eq nginx.exe"
 
 Image Name           PID Session Name     Session#    Mem Usage
 =============== ======== ============== ========== ============
@@ -47,20 +47,21 @@ nginx.exe           1332 Console                 0      3 112 K
 </programlisting>
 
 One of the processes is the master process and another is the worker process.
-If nginx will not start, you should look in
-the <path>logs\error.log</path> file for the reason.
-If the log file has not been created, the reason should be reported
+If nginx does not start, look for the reason in
+the error log file <path>logs\error.log</path>.
+If the log file has not been created, the reason for this should be reported
 in the Windows Event Log.
-If you see an error page instead of the expected page, you should also look in
-the <path>logs\error.log</path> file for the error reason.
+If an error page is displayed instead of the expected page, also look
+for the reason in the <path>logs\error.log</path> file.
 </para>
 
 <para>
 nginx/Windows uses the directory where it has been run as the prefix
-directory for relative paths in the configuration.
-In the example above, the prefix directory is
-<path>C:\nginx-<development_version />\</path>.
-Paths in the configuration must be set in Unix style using forward slashes:
+for relative paths in the configuration.
+In the example above, the prefix is
+<path>C:\nginx-<development_version/>\</path>.
+Paths in a configuration file must be specified in UNIX-style using
+forward slashes:
 
 <programlisting>
 access_log   logs/site.log;
@@ -69,33 +70,33 @@ root         C:/web/html;
 </para>
 
 <para>
-nginx/Windows runs as a standard console application, not a service,
+nginx/Windows runs as a standard console application (not a service),
 and it can be managed using the following commands:
 
 <table note="yes">
 
 <tr>
 <td width="20%">nginx -s stop</td>
-<td>quick exit</td>
+<td>fast shutdown</td>
 </tr>
 
 <tr>
 <td>nginx -s quit</td>
-<td>graceful quit</td>
+<td>graceful shutdown</td>
 </tr>
 
 <tr>
 <td>nginx -s reload</td>
 <td>
 changing configuration,
-starting a new worker,
-quitting an old worker gracefully
+starting new worker processes with a new configuration,
+graceful shutdown of old worker processes
 </td>
 </tr>
 
 <tr>
 <td>nginx -s reopen</td>
-<td>reopening log files</td>
+<td>re-opening log files</td>
 </tr>
 
 </table>
@@ -109,7 +110,8 @@ quitting an old worker gracefully
 <list>
 
 <item>
-Although several workers can be run, only one of them actually does any work.
+Although several workers can be started, only one of them
+actually does any work.
 </item>
 
 <item>
@@ -118,7 +120,7 @@ A worker can handle no more than 1024 si
 
 <item>
 The cache and other modules which require shared memory support do not work
-in Windows Vista and later due to
+on Windows Vista and later versions due to
 address space layout randomization being enabled in these Windows versions.
 </item>
 
@@ -136,11 +138,11 @@ Running as a service.
 </item>
 
 <item>
-Using the I/O completion ports as notification method.
+Using the I/O completion ports as a request processing method.
 </item>
 
 <item>
-Using multiple worker threads inside single worker process.
+Using multiple worker threads inside a single worker process.
 </item>
 
 </list>
--- a/xml/ru/docs/windows.xml
+++ b/xml/ru/docs/windows.xml
@@ -1,54 +1,153 @@
 <!DOCTYPE article SYSTEM "../../../dtd/article.dtd">
 
-<article name="Установка и использование под Windows"
+<article name="nginx под Windows"
          link="/ru/docs/windows.html"
          lang="ru">
 
 <section>
 
 <para>
-nginx/Windows работает с Win32 API (не эмуляция Cygwin).
-В качестве метода обработки соединений используется select,
-поэтому не стоит ожидать высокой производительности и масштабируемости:
-пока это бета-версия.
-На данный момент доступна практически вся функциональность, что и в nginx/Unix,
-за исключением XSLT-фильтра, фильтра изображений, модуля geoip
-и встроенного perl'а.
+Версия nginx под Windows использует “родной” Win32 API (не эмуляцию Cygwin).
+В настоящий момент в качестве метода обработки соединений используется
+только <c-func>select</c-func>,
+поэтому не стоит ожидать высокой производительности и масштабируемости.
+В силу этого и ряда других известных проблем версия nginx под Windows
+рассматривается пока как <i>бета</i>-версия.
+На данный момент в ней доступна практически вся функциональность, что и
+в версии nginx под UNIX, за исключением
+XSLT-фильтра, фильтра изображений, модуля GeoIP и встроенного языка Perl.
 </para>
 
 <para>
-Распаковываем дистрибутив на диск C:, переходим в каталог
-nginx-<development_version/> и запускаем <command>nginx</command>:
+Чтобы установить nginx/Windows, <link doc="../download.xml">скачайте</link>
+дистрибутив последней разрабатываемой версии (<development_version/>),
+поскольку ветвь разработки nginx содержит все известные исправления.
+Затем распакуйте дистрибутив, перейдите в каталог
+nginx-<development_version/>
+и запустите <command>nginx</command>.
+Вот пример для корневого каталога на диске C:
+
 <programlisting>
 cd c:\
 unzip nginx-<development_version/>.zip
 cd nginx-<development_version/>
 start nginx
 </programlisting>
-</para>
+
+Чтобы увидеть процессы nginx, запустите утилиту командной строки
+<command>tasklist</command>:
+
+<programlisting>
+C:\nginx-<development_version/>&gt;tasklist /fi "imagename eq nginx.exe"
 
-<para>
-Если nginx не запустился, нужно смотреть причины в error_log.
-Если же error_log не создался, то об этом сообщается в Event Log.
+Image Name           PID Session Name     Session#    Mem Usage
+=============== ======== ============== ========== ============
+nginx.exe            652 Console                 0      2 780 K
+nginx.exe           1332 Console                 0      3 112 K
+</programlisting>
+
+Один из процессов основной, другой&mdash;рабочий.
+Если nginx не запускается, нужно искать причину в
+в файле лога ошибок <path>logs\error.log</path>.
+Если же лог-файл не создался, то причину этого следует искать
+в Windows Event Log.
+Если вместо ожидаемой страницы выводится страница с ошибкой, нужно также
+искать причины ошибки в файле <path>logs\error.log</path>.
 </para>
 
 <para>
-nginx/Windows работает как обычное приложение (не сервис) и
-управляется следующим образом:
-<note>
-<table>
+nginx/Windows использует каталог, в котором он был запущен, в качестве
+префикса для относительных путей в конфигурации.
+В вышеприведённом примере префиксом является
+<path>C:\nginx-<development_version/>\</path>.
+Пути в конфигурационном файле должны задаваться в UNIX-стиле с использованием
+прямых слэшей:
+
+<programlisting>
+access_log   logs/site.log;
+root         C:/web/html;
+</programlisting>
+</para>
+
+<para>
+nginx/Windows работает как стандартное консольное приложение (не сервис)
+и управляется при помощи следующих команд:
+
+<table note="yes">
 
-<tr><td width="20%">nginx -s stop</td><td>быстрое завершение</td></tr>
-<tr><td width="20%">nginx -s quit</td><td>плавное завершение</td></tr>
-<tr><td width="20%">nginx -s reload</td><td>изменение конфигурации,
+<tr>
+<td width="20%">nginx -s stop</td>
+<td>быстрое завершение</td>
+</tr>
+
+<tr>
+<td>nginx -s quit</td>
+<td>плавное завершение</td>
+</tr>
+
+<tr>
+<td>nginx -s reload</td>
+<td>
+изменение конфигурации,
 запуск новых рабочих процессов с новой конфигурацией,
-плавное завершение старых рабочих процессов</td></tr>
-<tr><td width="20%">nginx -s reopen</td><td>переоткрытие лог-файлов</td></tr>
+плавное завершение старых рабочих процессов
+</td>
+</tr>
+
+<tr>
+<td>nginx -s reopen</td>
+<td>переоткрытие лог-файлов</td>
+</tr>
 
 </table>
-</note>
 </para>
 
 </section>
 
+<section id="known_issues"
+        name="Известные проблемы">
+
+<list>
+
+<item>
+Хоть и возможен запуск нескольких рабочих процессов, только один из них
+реально работает.
+</item>
+
+<item>
+Рабочий процесс может обслуживать не более 1024 одновременных соединений.
+</item>
+
+<item>
+Кэш и другие модули, требующие поддержки разделяемой памяти, не работают
+под Windows Vista и более поздними версиями в связи с тем, что на этих
+версиях Windows включена рандомизация адресного пространства.
+</item>
+
+</list>
+
+</section>
+
+<section id="possible_future_enhancements"
+        name="Возможные усовершенствования в будущем">
+
+<list>
+
+<item>
+Запуск в виде сервиса.
+</item>
+
+<item>
+Использование портов завершения ввода-вывода (I/O completion ports)
+в качестве метода обработки соединений.
+</item>
+
+<item>
+Использование нескольких рабочих нитей внутри одного рабочего процесса.
+</item>
+
+</list>
+
+</section>
+
 </article>