VeryNginx
VeryNginx copied to clipboard
Summary Matcher 不会在 Rewrite All 情况下工作
Nginx conf 配置文件中以 try_files
和 rewrite
方式工作的目录重写均不会触发 Matcher,vn 面板中的 rewrite 也是如此
复现:
matcher_1
: ^/api/all$
matcher_all_requests
: ^(.*)$
rewrite_1
: matcher_all_requests
to /
summary_collect
: 使用 matcher_1
无法收集到数据
但是如果在 rewrite_1
这条规则上单独建立 URI /api/all
rewrite 到 /
的规则 collect 就可以收集到了
还有一个问题:我是 php 应用,需要将所有请求 rewrite 定向到 /index.php
,但是如果在 vn 的 rewrite 中填写目标地址 /index.php
访问,浏览器就会下载 index.bin
,内容为 php 源文件,目标地址改成 /
就没有问题