comparison xml/en/docs/windows.xml @ 265:4d047c05b7ad

Revised the "nginx for Windows" article.
author Ruslan Ermilov <ru@nginx.com>
date Thu, 22 Dec 2011 09:07:37 +0000
parents 682163f2b298
children 6135f3c95bf6
comparison
equal deleted inserted replaced
264:06b4c1f3149d 265:4d047c05b7ad
1 <!DOCTYPE article SYSTEM "../../../dtd/article.dtd"> 1 <!DOCTYPE article SYSTEM "../../../dtd/article.dtd">
2 2
3 <article name="nginx/Windows usage" 3 <article name="nginx for Windows"
4 link="/en/docs/windows.html" 4 link="/en/docs/windows.html"
5 lang="en"> 5 lang="en">
6
7 6
8 <section> 7 <section>
9 8
10 <para> 9 <para>
11 nginx/Windows uses the native Win32 API (not the Cygwin emulation layer). 10 Version of nginx for Windows uses the native Win32 API (not the Cygwin emulation
12 Currently only the <i>select</i> method is used as a notification method, 11 layer).
13 therefore you should not expect high performance and scalability. 12 Only the <c-func>select</c-func> request processing method is currently used,
14 Because of this and some known issues nginx/Windows is considered 13 so high performance and scalability should not be expected.
15 as a <i>beta</i> version. 14 Due to this and some other known issues version of nginx for Windows
16 There is almost full-functionality in nginx/Windows as compared 15 is considered to be a <i>beta</i> version.
17 with the Unix version, 16 At this time, it provides almost the same functionality as a UNIX version
18 except XSLT filter, image filter, GeoIP module, and embedded Perl language. 17 of nginx except for
18 XSLT filter, image filter, GeoIP module, and embedded Perl language.
19 </para> 19 </para>
20 20
21 <para> 21 <para>
22 To install nginx/Windows, you should <a href="/en/download.xml">download</a> 22 To install nginx/Windows, <link doc="../download.xml">download</link>
23 the latest <development_version /> development version zipped file, 23 the latest development version distribution (<development_version/>),
24 since the development branch contains all known fixes, 24 since the development branch of nginx contains all known fixes.
25 especially Windows related. 25 Then unpack the distribution, go to the
26 Then you should unzip the file, 26 nginx-<development_version/>
27 go to the nginx-<development_version /> directory, and run nginx. 27 directory, and run <command>nginx</command>.
28 Here is an example for the drive C: root directory: 28 Here is an example for the drive C: root directory:
29 29
30 <programlisting> 30 <programlisting>
31 cd c:\ 31 cd c:\
32 unzip nginx-<development_version />.zip 32 unzip nginx-<development_version/>.zip
33 cd nginx-<development_version /> 33 cd nginx-<development_version/>
34 start nginx 34 start nginx
35 </programlisting> 35 </programlisting>
36 36
37 You may run the <command>tasklist</command> command line utility 37 Run the <command>tasklist</command> command-line utility
38 to see nginx processes: 38 to see nginx processes:
39 39
40 <programlisting> 40 <programlisting>
41 C:\nginx-<development_version />&gt;tasklist /fi "imagename eq nginx.exe" 41 C:\nginx-<development_version/>&gt;tasklist /fi "imagename eq nginx.exe"
42 42
43 Image Name PID Session Name Session# Mem Usage 43 Image Name PID Session Name Session# Mem Usage
44 =============== ======== ============== ========== ============ 44 =============== ======== ============== ========== ============
45 nginx.exe 652 Console 0 2 780 K 45 nginx.exe 652 Console 0 2 780 K
46 nginx.exe 1332 Console 0 3 112 K 46 nginx.exe 1332 Console 0 3 112 K
47 </programlisting> 47 </programlisting>
48 48
49 One of the processes is the master process and another is the worker process. 49 One of the processes is the master process and another is the worker process.
50 If nginx will not start, you should look in 50 If nginx does not start, look for the reason in
51 the <path>logs\error.log</path> file for the reason. 51 the error log file <path>logs\error.log</path>.
52 If the log file has not been created, the reason should be reported 52 If the log file has not been created, the reason for this should be reported
53 in the Windows Event Log. 53 in the Windows Event Log.
54 If you see an error page instead of the expected page, you should also look in 54 If an error page is displayed instead of the expected page, also look
55 the <path>logs\error.log</path> file for the error reason. 55 for the reason in the <path>logs\error.log</path> file.
56 </para> 56 </para>
57 57
58 <para> 58 <para>
59 nginx/Windows uses the directory where it has been run as the prefix 59 nginx/Windows uses the directory where it has been run as the prefix
60 directory for relative paths in the configuration. 60 for relative paths in the configuration.
61 In the example above, the prefix directory is 61 In the example above, the prefix is
62 <path>C:\nginx-<development_version />\</path>. 62 <path>C:\nginx-<development_version/>\</path>.
63 Paths in the configuration must be set in Unix style using forward slashes: 63 Paths in a configuration file must be specified in UNIX-style using
64 forward slashes:
64 65
65 <programlisting> 66 <programlisting>
66 access_log logs/site.log; 67 access_log logs/site.log;
67 root C:/web/html; 68 root C:/web/html;
68 </programlisting> 69 </programlisting>
69 </para> 70 </para>
70 71
71 <para> 72 <para>
72 nginx/Windows runs as a standard console application, not a service, 73 nginx/Windows runs as a standard console application (not a service),
73 and it can be managed using the following commands: 74 and it can be managed using the following commands:
74 75
75 <table note="yes"> 76 <table note="yes">
76 77
77 <tr> 78 <tr>
78 <td width="20%">nginx -s stop</td> 79 <td width="20%">nginx -s stop</td>
79 <td>quick exit</td> 80 <td>fast shutdown</td>
80 </tr> 81 </tr>
81 82
82 <tr> 83 <tr>
83 <td>nginx -s quit</td> 84 <td>nginx -s quit</td>
84 <td>graceful quit</td> 85 <td>graceful shutdown</td>
85 </tr> 86 </tr>
86 87
87 <tr> 88 <tr>
88 <td>nginx -s reload</td> 89 <td>nginx -s reload</td>
89 <td> 90 <td>
90 changing configuration, 91 changing configuration,
91 starting a new worker, 92 starting new worker processes with a new configuration,
92 quitting an old worker gracefully 93 graceful shutdown of old worker processes
93 </td> 94 </td>
94 </tr> 95 </tr>
95 96
96 <tr> 97 <tr>
97 <td>nginx -s reopen</td> 98 <td>nginx -s reopen</td>
98 <td>reopening log files</td> 99 <td>re-opening log files</td>
99 </tr> 100 </tr>
100 101
101 </table> 102 </table>
102 </para> 103 </para>
103 104
107 name="Known issues"> 108 name="Known issues">
108 109
109 <list> 110 <list>
110 111
111 <item> 112 <item>
112 Although several workers can be run, only one of them actually does any work. 113 Although several workers can be started, only one of them
114 actually does any work.
113 </item> 115 </item>
114 116
115 <item> 117 <item>
116 A worker can handle no more than 1024 simultaneous connections. 118 A worker can handle no more than 1024 simultaneous connections.
117 </item> 119 </item>
118 120
119 <item> 121 <item>
120 The cache and other modules which require shared memory support do not work 122 The cache and other modules which require shared memory support do not work
121 in Windows Vista and later due to 123 on Windows Vista and later versions due to
122 address space layout randomization being enabled in these Windows versions. 124 address space layout randomization being enabled in these Windows versions.
123 </item> 125 </item>
124 126
125 </list> 127 </list>
126 128
134 <item> 136 <item>
135 Running as a service. 137 Running as a service.
136 </item> 138 </item>
137 139
138 <item> 140 <item>
139 Using the I/O completion ports as notification method. 141 Using the I/O completion ports as a request processing method.
140 </item> 142 </item>
141 143
142 <item> 144 <item>
143 Using multiple worker threads inside single worker process. 145 Using multiple worker threads inside a single worker process.
144 </item> 146 </item>
145 147
146 </list> 148 </list>
147 149
148 </section> 150 </section>