Mercurial > hg > nginx-site
annotate xml/cn/docs/windows.xml @ 2846:fdf1464e1977
Moved banner to the external file to make partial rollout possible.
An idea is to have several banners and show them with different probability
specified by split directive in the nginx.conf
author | Sergey Budnevitch <sb@waeme.net> |
---|---|
date | Tue, 10 May 2022 18:07:27 +0400 |
parents | 9ad2770d3f28 |
children |
rev | line source |
---|---|
720
9934338f83af
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
558
diff
changeset
|
1 <!-- |
9934338f83af
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
558
diff
changeset
|
2 Copyright (C) Igor Sysoev |
9934338f83af
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
558
diff
changeset
|
3 Copyright (C) Nginx, Inc. |
9934338f83af
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
558
diff
changeset
|
4 --> |
9934338f83af
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
558
diff
changeset
|
5 |
558
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
6 <!DOCTYPE article SYSTEM "../../../dtd/article.dtd"> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
7 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
8 <article name="nginx Windows版使用说明" |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
9 link="/cn/docs/windows.html" |
720
9934338f83af
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
558
diff
changeset
|
10 lang="cn" |
9934338f83af
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
558
diff
changeset
|
11 rev="1"> |
558
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
12 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
13 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
14 <section> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
15 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
16 <para> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
17 nginx的Windows版本使用原生Win32 API(非Cygwin模拟层)。当前nginx/Windows只使用<i>select</i>作为通知方法,所以不要期待它有很高的性能和扩展性。鉴于这点和一些已知问题,nginx/Windows目前还处于<i>beta</i>阶段。nginx/Windows和Unix版本相比,功能几乎已经齐全,除了XSLT过滤器、图像过滤器、GeoIP模块和嵌入Perl语言支持以外。 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
18 </para> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
19 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
20 <para> |
922
9ad2770d3f28
Finished renaming development to mainline.
Ruslan Ermilov <ru@nginx.com>
parents:
720
diff
changeset
|
21 安装nginx/Windows,需要<link doc="../download.xml">下载</link>最新的<mainline_version />开发版本,因为开发分支上包含了所有已知的问题修复,尤其是针对Windows版本的问题修复。解压缩下载得到的zip文件,进入nginx-<mainline_version />目录,运行nginx。下面给出一个在C盘根目录下安装的例子: |
558
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
22 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
23 <programlisting> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
24 cd c:\ |
922
9ad2770d3f28
Finished renaming development to mainline.
Ruslan Ermilov <ru@nginx.com>
parents:
720
diff
changeset
|
25 unzip nginx-<mainline_version />.zip |
9ad2770d3f28
Finished renaming development to mainline.
Ruslan Ermilov <ru@nginx.com>
parents:
720
diff
changeset
|
26 cd nginx-<mainline_version /> |
558
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
27 start nginx |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
28 </programlisting> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
29 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
30 可以在命令行运行<command>tasklist</command>命令来查看nginx进程: |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
31 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
32 <programlisting> |
922
9ad2770d3f28
Finished renaming development to mainline.
Ruslan Ermilov <ru@nginx.com>
parents:
720
diff
changeset
|
33 C:\nginx-<mainline_version />>tasklist /fi "imagename eq nginx.exe" |
558
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
34 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
35 Image Name PID Session Name Session# Mem Usage |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
36 =============== ======== ============== ========== ============ |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
37 nginx.exe 652 Console 0 2 780 K |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
38 nginx.exe 1332 Console 0 3 112 K |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
39 </programlisting> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
40 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
41 其中一个是主进程,另一个是工作进程。如果nginx没有启动,请查看<path>logs\error.log</path>文件以寻找失败原因。如果日志文件不存在,那失败原因会记录在Windows事件日志中。如果某次请求没有展示预想的页面,而是展示了错误页面,也请查看<path>logs\error.log</path>文件。 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
42 </para> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
43 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
44 <para> |
922
9ad2770d3f28
Finished renaming development to mainline.
Ruslan Ermilov <ru@nginx.com>
parents:
720
diff
changeset
|
45 nginx/Windows使用工作目录作为前缀将配置文件中设置的相对目录补齐。就上面安装的例子而言,工作目录应该是<path>C:\nginx-<mainline_version />\</path>(工作目录基本上与运行文件所在的目录相同)。配置文件中的目录请使用“/”,而不是“\”做目录分隔: |
558
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
46 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
47 <programlisting> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
48 access_log logs/site.log; |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
49 root C:/web/html; |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
50 </programlisting> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
51 </para> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
52 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
53 <para> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
54 nginx/Windows作为标准控制台应用运行,而不是系统服务。可以用下面的命令控制: |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
55 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
56 <table note="yes"> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
57 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
58 <tr> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
59 <td width="20%">nginx -s stop</td> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
60 <td>快速退出</td> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
61 </tr> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
62 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
63 <tr> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
64 <td>nginx -s quit</td> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
65 <td>优雅退出</td> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
66 </tr> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
67 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
68 <tr> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
69 <td>nginx -s reload</td> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
70 <td> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
71 更换配置,启动新的工作进程,优雅的关闭以往的工作进程 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
72 </td> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
73 </tr> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
74 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
75 <tr> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
76 <td>nginx -s reopen</td> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
77 <td>重新打开日志文件</td> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
78 </tr> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
79 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
80 </table> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
81 </para> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
82 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
83 </section> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
84 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
85 <section id="known_issues" |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
86 name="已知问题"> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
87 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
88 <list type="bullet"> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
89 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
90 <listitem> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
91 虽然可以启动若干工作进程运行,实际上只有一个进程在处理请求所有请求。 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
92 </listitem> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
93 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
94 <listitem> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
95 一个工作进程只能处理不超过1024个并发连接。 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
96 </listitem> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
97 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
98 <listitem> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
99 缓存和其他需要共享内存支持的模块在Windows Vista及后续版本的操作系统中无法工作,因为在这些操作系统中,地址空间的布局是随机的。 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
100 </listitem> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
101 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
102 </list> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
103 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
104 </section> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
105 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
106 <section id="possible_future_enhancements" |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
107 name="日后可能加强的功能"> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
108 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
109 <list type="bullet"> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
110 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
111 <listitem> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
112 作为系统服务运行。 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
113 </listitem> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
114 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
115 <listitem> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
116 使用“I/O完成端口”作为事件模型。 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
117 </listitem> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
118 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
119 <listitem> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
120 使用单工作进程多线程的模型。 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
121 </listitem> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
122 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
123 </list> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
124 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
125 </section> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
126 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
127 </article> |