- 1、本文档共26页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Nginx跳转参数与实例(国外英文资料)
Nginx跳转参数与实例(国外英文资料)
Nginx jump parameters and instances
/blog/static/1398273312010240454593/
This log is from /blog/static/42930654200992910456569/
The Location grammatical syntax: Location [= | | | ~ ~ * ^ ~] / uri / {... }
Location = / {
# only matches/queries.
[the configuration A]
}
The location / {
# matches any query because all requests are/begin. But regular expression rules and long block rules will be prioritized and query matches.
[the configuration B]
}
The location ^ ~ / images / {
# matches any query that is/images/begins and stops the search. Any regular expression will not be tested.
[C] the configuration
}
Location ~ *. (GIF | JPG | jpeg) ${.
# no case-insensitive matches any request that has a GIF, JPG, or jpeg ending. However, all/images/directory requests will be used with Configuration C.
[the configuration D]
}
Regular expressions match, among them:
* to distinguish case from case
* for case-insensitive matches
3. *! ~ and! The ~ * is case-insensitive and case-insensitive
File and directory matching:
* -f and! -f is used to determine if a file exists
* -d and! -d is used to determine if a directory exists
* * e! -e is used to determine if a file or directory exists
* -x and! -x is used to determine if the file is executable
Flag tags are:
* last is the equivalent of the [L] mark in Apache
* break ends the match and no longer matches the following rule
* redirect returns a 302 temporary redirect address bar to display the post-jump address
* permanent return 301 permanent redirect address bar will display the post-jump address
Some of the available global variables can be used for conditional judgment (for completion)
1. $args
2. $content_length
3. $content_type
4. $document_root
5. $document_uri
6. $host
7. $http_user_agent
$http_cookie 8.
9. $limit_rate
10. $request_body_file
11. $request_method
12. $remote_addr
13. $remote_port
14. $remote_user
15. $request_filename
16. $request_uri
17. $query_string
18 $scheme
19. $server_protocol
20 $serve
文档评论(0)