# HG changeset patch # User Ruslan Ermilov # Date 1324544857 0 # Node ID 4d047c05b7add4b42db102fdf19dd047e00d614e # Parent 06b4c1f3149dbbb3e48976b0f93220f9ef0d05ca Revised the "nginx for Windows" article. diff -r 06b4c1f3149d -r 4d047c05b7ad xml/en/docs/windows.xml --- a/xml/en/docs/windows.xml Wed Dec 21 09:49:57 2011 +0000 +++ b/xml/en/docs/windows.xml Thu Dec 22 09:07:37 2011 +0000 @@ -1,44 +1,44 @@ -
-
-nginx/Windows uses the native Win32 API (not the Cygwin emulation layer). -Currently only the select 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 beta 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 select 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 beta 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. -To install nginx/Windows, you should download -the latest 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- directory, and run nginx. +To install nginx/Windows, download +the latest development version distribution (), +since the development branch of nginx contains all known fixes. +Then unpack the distribution, go to the +nginx- +directory, and run nginx. Here is an example for the drive C: root directory: cd c:\ -unzip nginx-.zip -cd nginx- +unzip nginx-.zip +cd nginx- start nginx -You may run the tasklist command line utility +Run the tasklist command-line utility to see nginx processes: -C:\nginx->tasklist /fi "imagename eq nginx.exe" +C:\nginx->tasklist /fi "imagename eq nginx.exe" Image Name PID Session Name Session# Mem Usage =============== ======== ============== ========== ============ @@ -47,20 +47,21 @@ One of the processes is the master process and another is the worker process. -If nginx will not start, you should look in -the logs\error.log 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 logs\error.log. +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 logs\error.log file for the error reason. +If an error page is displayed instead of the expected page, also look +for the reason in the logs\error.log file. 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 -C:\nginx-\. -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 +C:\nginx-\. +Paths in a configuration file must be specified in UNIX-style using +forward slashes: access_log logs/site.log; @@ -69,33 +70,33 @@ -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: - + - + - +
nginx -s stopquick exitfast shutdown
nginx -s quitgraceful quitgraceful shutdown
nginx -s reload 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
nginx -s reopenreopening log filesre-opening log files
@@ -109,7 +110,8 @@ -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. @@ -118,7 +120,7 @@ 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. @@ -136,11 +138,11 @@ -Using the I/O completion ports as notification method. +Using the I/O completion ports as a request processing method. -Using multiple worker threads inside single worker process. +Using multiple worker threads inside a single worker process. diff -r 06b4c1f3149d -r 4d047c05b7ad xml/ru/docs/windows.xml --- a/xml/ru/docs/windows.xml Wed Dec 21 09:49:57 2011 +0000 +++ b/xml/ru/docs/windows.xml Thu Dec 22 09:07:37 2011 +0000 @@ -1,54 +1,153 @@ -
-nginx/Windows работает с Win32 API (не эмуляция Cygwin). -В качестве метода обработки соединений используется select, -поэтому не стоит ожидать высокой производительности и масштабируемости: -пока это бета-версия. -На данный момент доступна практически вся функциональность, что и в nginx/Unix, -за исключением XSLT-фильтра, фильтра изображений, модуля geoip -и встроенного perl'а. +Версия nginx под Windows использует “родной” Win32 API (не эмуляцию Cygwin). +В настоящий момент в качестве метода обработки соединений используется +только select, +поэтому не стоит ожидать высокой производительности и масштабируемости. +В силу этого и ряда других известных проблем версия nginx под Windows +рассматривается пока как бета-версия. +На данный момент в ней доступна практически вся функциональность, что и +в версии nginx под UNIX, за исключением +XSLT-фильтра, фильтра изображений, модуля GeoIP и встроенного языка Perl. -Распаковываем дистрибутив на диск C:, переходим в каталог -nginx- и запускаем nginx: +Чтобы установить nginx/Windows, скачайте +дистрибутив последней разрабатываемой версии (), +поскольку ветвь разработки nginx содержит все известные исправления. +Затем распакуйте дистрибутив, перейдите в каталог +nginx- +и запустите nginx. +Вот пример для корневого каталога на диске C: + cd c:\ unzip nginx-.zip cd nginx- start nginx - + +Чтобы увидеть процессы nginx, запустите утилиту командной строки +tasklist: + + +C:\nginx->tasklist /fi "imagename eq nginx.exe" - -Если 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 + + +Один из процессов основной, другой—рабочий. +Если nginx не запускается, нужно искать причину в +в файле лога ошибок logs\error.log. +Если же лог-файл не создался, то причину этого следует искать +в Windows Event Log. +Если вместо ожидаемой страницы выводится страница с ошибкой, нужно также +искать причины ошибки в файле logs\error.log. -nginx/Windows работает как обычное приложение (не сервис) и -управляется следующим образом: - - +nginx/Windows использует каталог, в котором он был запущен, в качестве +префикса для относительных путей в конфигурации. +В вышеприведённом примере префиксом является +C:\nginx-\. +Пути в конфигурационном файле должны задаваться в UNIX-стиле с использованием +прямых слэшей: + + +access_log logs/site.log; +root C:/web/html; + + + + +nginx/Windows работает как стандартное консольное приложение (не сервис) +и управляется при помощи следующих команд: + +
- - - + + + + + + + + + + + + - +плавное завершение старых рабочих процессов + + + + + + +
nginx -s stopбыстрое завершение
nginx -s quitплавное завершение
nginx -s reloadизменение конфигурации, +
nginx -s stopбыстрое завершение
nginx -s quitплавное завершение
nginx -s reload +изменение конфигурации, запуск новых рабочих процессов с новой конфигурацией, -плавное завершение старых рабочих процессов
nginx -s reopenпереоткрытие лог-файлов
nginx -s reopenпереоткрытие лог-файлов
-
+
+ + + + +Хоть и возможен запуск нескольких рабочих процессов, только один из них +реально работает. + + + +Рабочий процесс может обслуживать не более 1024 одновременных соединений. + + + +Кэш и другие модули, требующие поддержки разделяемой памяти, не работают +под Windows Vista и более поздними версиями в связи с тем, что на этих +версиях Windows включена рандомизация адресного пространства. + + + + +
+ +
+ + + + +Запуск в виде сервиса. + + + +Использование портов завершения ввода-вывода (I/O completion ports) +в качестве метода обработки соединений. + + + +Использование нескольких рабочих нитей внутри одного рабочего процесса. + + + + +
+