Mercurial > hg > nginx-site
annotate xml/cn/docs/http/converting_rewrite_rules.xml @ 3004:c95cbff9f571
Added info about the Unit 1.31.0 release.
author | Artem Konev <artem.konev@nginx.com> |
---|---|
date | Thu, 31 Aug 2023 22:38:02 +0100 |
parents | 9934338f83af |
children |
rev | line source |
---|---|
720
9934338f83af
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
593
diff
changeset
|
1 <!-- |
9934338f83af
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
593
diff
changeset
|
2 Copyright (C) Igor Sysoev |
9934338f83af
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
593
diff
changeset
|
3 Copyright (C) Nginx, Inc. |
9934338f83af
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
593
diff
changeset
|
4 --> |
9934338f83af
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
593
diff
changeset
|
5 |
9934338f83af
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
593
diff
changeset
|
6 <!DOCTYPE article SYSTEM "../../../../dtd/article.dtd"> |
558
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="转换rewrite规则" |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
9 link="/cn/docs/http/converting_rewrite_rules.html" |
720
9934338f83af
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
593
diff
changeset
|
10 rev="1" |
558
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
11 lang="cn"> |
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 name="重定向到主站"> |
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 共享站点的管理员,习惯于<i>只</i>在Apache下使用.htaccess文件配置<i>所有</i>信息,通常会将下面规则 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
18 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
19 <programlisting> |
720
9934338f83af
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
593
diff
changeset
|
20 RewriteCond %{HTTP_HOST} example.org |
9934338f83af
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
593
diff
changeset
|
21 RewriteRule (.*) http://www.example.org$1 |
558
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
22 </programlisting> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
23 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
24 翻译成这样: |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
25 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
26 <programlisting> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
27 server { |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
28 listen 80; |
720
9934338f83af
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
593
diff
changeset
|
29 server_name www.example.org example.org; |
9934338f83af
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
593
diff
changeset
|
30 if ($http_host = example.org) { |
9934338f83af
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
593
diff
changeset
|
31 rewrite (.*) http://www.example.org$1; |
558
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
32 } |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
33 ... |
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 </programlisting> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
36 </para> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
37 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
38 <para> |
720
9934338f83af
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
593
diff
changeset
|
39 这种做法是错的,复杂而且低效。正确的方式是为<literal>example.org</literal>定义一个单独的服务器: |
558
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 <programlisting> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
42 server { |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
43 listen 80; |
720
9934338f83af
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
593
diff
changeset
|
44 server_name example.org; |
9934338f83af
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
593
diff
changeset
|
45 return 301 http://www.example.org$request_uri; |
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 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
48 server { |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
49 listen 80; |
720
9934338f83af
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
593
diff
changeset
|
50 server_name www.example.org; |
558
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
51 ... |
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 </programlisting> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
54 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
55 <note> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
56 在0.9.1版本(含)以前,可以这样实现重定向: |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
57 <programlisting> |
720
9934338f83af
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
593
diff
changeset
|
58 rewrite ^ http://www.example.org$request_uri?; |
558
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
59 </programlisting> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
60 </note> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
61 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
62 </para> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
63 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
64 </section> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
65 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
66 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
67 <section> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
68 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
69 <para> |
720
9934338f83af
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
593
diff
changeset
|
70 再举一个例子,处理一个和刚才相反的逻辑:既不是来自<literal>example.com</literal>,又不是来自<literal>www.example.com</literal>: |
558
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 <programlisting> |
720
9934338f83af
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
593
diff
changeset
|
73 RewriteCond %{HTTP_HOST} !example.com |
9934338f83af
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
593
diff
changeset
|
74 RewriteCond %{HTTP_HOST} !www.example.com |
9934338f83af
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
593
diff
changeset
|
75 RewriteRule (.*) http://www.example.com$1 |
558
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
76 </programlisting> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
77 |
720
9934338f83af
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
593
diff
changeset
|
78 应该按下面这样分开定义<literal>example.com</literal>、<literal>www.example.com</literal>和其他站点: |
558
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 <programlisting> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
81 server { |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
82 listen 80; |
720
9934338f83af
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
593
diff
changeset
|
83 server_name example.com www.example.com; |
558
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 } |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
86 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
87 server { |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
88 listen 80 default_server; |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
89 server_name _; |
720
9934338f83af
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
593
diff
changeset
|
90 return 301 http://example.com$request_uri; |
558
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 </programlisting> |
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 <note> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
95 在0.9.1版本(含)以前,可以这样实现重定向: |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
96 <programlisting> |
720
9934338f83af
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
593
diff
changeset
|
97 rewrite ^ http://example.com$request_uri?; |
558
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
98 </programlisting> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
99 </note> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
100 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
101 </para> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
102 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
103 </section> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
104 |
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="converting_mongrel_rules" |
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 <para> |
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 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
112 <programlisting> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
113 DocumentRoot /var/www/myapp.com/current/public |
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 RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
116 RewriteCond %{SCRIPT_FILENAME} !maintenance.html |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
117 RewriteRule ^.*$ %{DOCUMENT_ROOT}/system/maintenance.html [L] |
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 RewriteCond %{REQUEST_FILENAME} -f |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
120 RewriteRule ^(.*)$ $1 [QSA,L] |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
121 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
122 RewriteCond %{REQUEST_FILENAME}/index.html -f |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
123 RewriteRule ^(.*)$ $1/index.html [QSA,L] |
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 RewriteCond %{REQUEST_FILENAME}.html -f |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
126 RewriteRule ^(.*)$ $1/index.html [QSA,L] |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
127 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
128 RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L] |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
129 </programlisting> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
130 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
131 转换成nginx配置应该是这样: |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
132 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
133 <programlisting> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
134 location / { |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
135 root /var/www/myapp.com/current/public; |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
136 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
137 try_files /system/maintenance.html |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
138 $uri $uri/index.html $uri.html |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
139 @mongrel; |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
140 } |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
141 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
142 location @mongrel { |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
143 proxy_pass http://mongrel; |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
144 } |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
145 </programlisting> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
146 </para> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
147 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
148 </section> |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
149 |
149f54c158f0
Added initial translation in simplified Chinese submitted by the
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
150 </article> |