File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ ## Nginx指令执行命令(01)
2
+ + ` rewrite ` 发生在` content ` 每个请求处理的相位之前,它的命令也被执行得更早
3
+
4
+ + 案例
5
+ ```
6
+ server {
7
+ listen 8008;
8
+ server_name localhost;
9
+ location /sum {
10
+ set $a 44;
11
+ echo $a;
12
+ set $a 66;
13
+ echo $a;
14
+ }
15
+ }
16
+
17
+ ```
18
+
19
+ + 实际的执行顺序是:
20
+ ```
21
+ set $a 44;
22
+ set $a 66;
23
+ echo $a;
24
+ echo $a;
25
+ ```
26
+ + 两个命令 设置在执行阶段`rewrite`,两个命令 回声在随后阶段执行`content`。不同阶段的命令无法执行。
Original file line number Diff line number Diff line change 16
16
- [ ] [ nginx变量使用方法详解笔记(3)] ( https://github.com/Tinywan/Lua-Nginx-Redis/blob/master/Nginx/nginx-2-config.md )
17
17
- [ ] [ nginx变量使用方法详解笔记(4)] ( https://github.com/Tinywan/Lua-Nginx-Redis/blob/master/Nginx/nginx-2-config.md )
18
18
- [ ] [ nginx变量使用方法详解笔记(5)] ( https://github.com/Tinywan/Lua-Nginx-Redis/blob/master/Nginx/nginx-2-config.md )
19
+ + Nginx指令执行顺序
20
+ - [x] [ Nginx指令执行命令(01)] ( https://github.com/Tinywan/Lua-Nginx-Redis/blob/master/Nginx-Develop/notes-1.md )
21
+ - [x] [ nginx变量使用方法详解笔记(2)] ( https://github.com/Tinywan/Lua-Nginx-Redis/blob/master/Nginx-Develop/notes-2.md )
22
+ - [ ] [ nginx变量使用方法详解笔记(3)] ( https://github.com/Tinywan/Lua-Nginx-Redis/blob/master/Nginx/nginx-2-config.md )
23
+ - [ ] [ nginx变量使用方法详解笔记(4)] ( https://github.com/Tinywan/Lua-Nginx-Redis/blob/master/Nginx/nginx-2-config.md )
24
+ - [ ] [ nginx变量使用方法详解笔记(5)] ( https://github.com/Tinywan/Lua-Nginx-Redis/blob/master/Nginx/nginx-2-config.md )
19
25
+ ** Nginx高性能WEB服务器详解**
20
26
+ 第一章 初探
21
27
- [ x] [ Nginx的历史] ( https://github.com/Tinywan/Lua-Nginx-Redis/blob/master/Nginx/nginx-2-config.md )
You can’t perform that action at this time.
0 commit comments