现在位置 >首页 > last
怎样区别nginx中rewrite时break和last已关闭评论
2011年09月02日 Nginx ⁄ 被围观 24,240 次+
怎样区别nginx中rewrite时break和last 在使用nginx配置rewrite中经常会遇到有的地方用last并不能工作,换成break就可以,其中的原理是对于根目录的理解有所区别,按我的测试结果大致是这样的。 location /    {         proxy_pass http://test;         alias /home/html/;         root /home/html;         rewrite "^/a/(.*)\.html$" /1.html last;     }   在location / { 配置里: 1、使用root指定源:使用last和break都可以 2、使用proxy_pass指定源:使用last和break都可以 3、使用alias指定源:必须...
阅读全文