ewrite和location区别: rewrite是在同一域名内更改资源获取的路径 Location是对路径 做控制访问或反向代理,可以使用proxy_pass到其他主机 很多情况下rewrite会写在location里, 他们的执行顺序: 执行server块的rewrite指令 执行location匹配 执行选定的location中的rewrite指令 来源:https://www.cnblogs.com/liu1584712/p/11573071.html 标签 location rewrite