处理HTTP请求的11个阶段
如下图:
序号 | 阶段 | 指令 | 备注 |
1 | POST_READ | realip | 获取客户端真实IP |
2 | SERVER_REWRITE | rewrite | |
3 | FIND_CONFIG | ||
4 | REWRITE | rewrite | |
5 | POST_REWRITE | ||
6 | PRE_ACCESS | limit_conn, limit_req | |
7 | ACCESS | auth_basic, access, auth_request | auth_basic可以做访问限制 |
8 | POST_ACCESS | ||
9 | PRE_CONTENT | try_files | |
10 | CONTENT | index, autoindex, concat | |
11 | LOG | access_log | access_log记录请求日志 |