Mercurial > hg > nginx-site
annotate xml/en/docs/faq/variables_in_config.xml @ 1780:8df9ba4e56c6
Documented 400 error in stream $status.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Tue, 13 Sep 2016 16:14:49 +0300 |
parents | 764fbac1b8b4 |
children |
rev | line source |
---|---|
580
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
198
diff
changeset
|
1 <!-- |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
198
diff
changeset
|
2 Copyright (C) Nginx, Inc. |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
198
diff
changeset
|
3 --> |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
198
diff
changeset
|
4 |
198
ec4626d04879
- Bulk commit following discussion in devrep
Andrey Alexeev <andrew@nginx.com>
parents:
196
diff
changeset
|
5 <!DOCTYPE article SYSTEM "../../../../dtd/article.dtd"> |
196
aafe530e7d6f
- Added faq/ and more q&a as previously agreed
Andrey Alexeev <andrew@nginx.com>
parents:
diff
changeset
|
6 |
aafe530e7d6f
- Added faq/ and more q&a as previously agreed
Andrey Alexeev <andrew@nginx.com>
parents:
diff
changeset
|
7 <article name="Is there a proper way to use nginx variables to |
aafe530e7d6f
- Added faq/ and more q&a as previously agreed
Andrey Alexeev <andrew@nginx.com>
parents:
diff
changeset
|
8 make sections of the configuration shorter, |
aafe530e7d6f
- Added faq/ and more q&a as previously agreed
Andrey Alexeev <andrew@nginx.com>
parents:
diff
changeset
|
9 using them as macros for making |
aafe530e7d6f
- Added faq/ and more q&a as previously agreed
Andrey Alexeev <andrew@nginx.com>
parents:
diff
changeset
|
10 parts of configuration work as templates?" |
aafe530e7d6f
- Added faq/ and more q&a as previously agreed
Andrey Alexeev <andrew@nginx.com>
parents:
diff
changeset
|
11 link="/en/docs/faq/variables_in_config.html" |
589 | 12 lang="en" |
13 rev="1"> | |
196
aafe530e7d6f
- Added faq/ and more q&a as previously agreed
Andrey Alexeev <andrew@nginx.com>
parents:
diff
changeset
|
14 |
aafe530e7d6f
- Added faq/ and more q&a as previously agreed
Andrey Alexeev <andrew@nginx.com>
parents:
diff
changeset
|
15 <section> |
aafe530e7d6f
- Added faq/ and more q&a as previously agreed
Andrey Alexeev <andrew@nginx.com>
parents:
diff
changeset
|
16 |
aafe530e7d6f
- Added faq/ and more q&a as previously agreed
Andrey Alexeev <andrew@nginx.com>
parents:
diff
changeset
|
17 <para> |
aafe530e7d6f
- Added faq/ and more q&a as previously agreed
Andrey Alexeev <andrew@nginx.com>
parents:
diff
changeset
|
18 <initial>Q:</initial> |
aafe530e7d6f
- Added faq/ and more q&a as previously agreed
Andrey Alexeev <andrew@nginx.com>
parents:
diff
changeset
|
19 Is there a proper way to use nginx variables to make sections of |
aafe530e7d6f
- Added faq/ and more q&a as previously agreed
Andrey Alexeev <andrew@nginx.com>
parents:
diff
changeset
|
20 the configuration shorter, using them as macros for making |
aafe530e7d6f
- Added faq/ and more q&a as previously agreed
Andrey Alexeev <andrew@nginx.com>
parents:
diff
changeset
|
21 parts of configuration work as templates? |
aafe530e7d6f
- Added faq/ and more q&a as previously agreed
Andrey Alexeev <andrew@nginx.com>
parents:
diff
changeset
|
22 </para> |
aafe530e7d6f
- Added faq/ and more q&a as previously agreed
Andrey Alexeev <andrew@nginx.com>
parents:
diff
changeset
|
23 |
aafe530e7d6f
- Added faq/ and more q&a as previously agreed
Andrey Alexeev <andrew@nginx.com>
parents:
diff
changeset
|
24 <para> |
aafe530e7d6f
- Added faq/ and more q&a as previously agreed
Andrey Alexeev <andrew@nginx.com>
parents:
diff
changeset
|
25 |
aafe530e7d6f
- Added faq/ and more q&a as previously agreed
Andrey Alexeev <andrew@nginx.com>
parents:
diff
changeset
|
26 </para> |
aafe530e7d6f
- Added faq/ and more q&a as previously agreed
Andrey Alexeev <andrew@nginx.com>
parents:
diff
changeset
|
27 |
aafe530e7d6f
- Added faq/ and more q&a as previously agreed
Andrey Alexeev <andrew@nginx.com>
parents:
diff
changeset
|
28 <para> |
aafe530e7d6f
- Added faq/ and more q&a as previously agreed
Andrey Alexeev <andrew@nginx.com>
parents:
diff
changeset
|
29 <initial>A:</initial> |
aafe530e7d6f
- Added faq/ and more q&a as previously agreed
Andrey Alexeev <andrew@nginx.com>
parents:
diff
changeset
|
30 Variables should not be used as template macros. Variables are |
aafe530e7d6f
- Added faq/ and more q&a as previously agreed
Andrey Alexeev <andrew@nginx.com>
parents:
diff
changeset
|
31 evaluated in the run-time during the processing of each |
aafe530e7d6f
- Added faq/ and more q&a as previously agreed
Andrey Alexeev <andrew@nginx.com>
parents:
diff
changeset
|
32 request, so they are rather costly compared to plain static |
aafe530e7d6f
- Added faq/ and more q&a as previously agreed
Andrey Alexeev <andrew@nginx.com>
parents:
diff
changeset
|
33 configuration. Using variables to store static strings is also |
198
ec4626d04879
- Bulk commit following discussion in devrep
Andrey Alexeev <andrew@nginx.com>
parents:
196
diff
changeset
|
34 a bad idea. Instead, a macro expansion and "include" directives |
ec4626d04879
- Bulk commit following discussion in devrep
Andrey Alexeev <andrew@nginx.com>
parents:
196
diff
changeset
|
35 should be used to generate configs more easily and it can be |
ec4626d04879
- Bulk commit following discussion in devrep
Andrey Alexeev <andrew@nginx.com>
parents:
196
diff
changeset
|
36 done with the external tools, e.g. sed + make or any other |
ec4626d04879
- Bulk commit following discussion in devrep
Andrey Alexeev <andrew@nginx.com>
parents:
196
diff
changeset
|
37 common template mechanism. |
196
aafe530e7d6f
- Added faq/ and more q&a as previously agreed
Andrey Alexeev <andrew@nginx.com>
parents:
diff
changeset
|
38 </para> |
aafe530e7d6f
- Added faq/ and more q&a as previously agreed
Andrey Alexeev <andrew@nginx.com>
parents:
diff
changeset
|
39 |
aafe530e7d6f
- Added faq/ and more q&a as previously agreed
Andrey Alexeev <andrew@nginx.com>
parents:
diff
changeset
|
40 </section> |
aafe530e7d6f
- Added faq/ and more q&a as previously agreed
Andrey Alexeev <andrew@nginx.com>
parents:
diff
changeset
|
41 |
aafe530e7d6f
- Added faq/ and more q&a as previously agreed
Andrey Alexeev <andrew@nginx.com>
parents:
diff
changeset
|
42 </article> |