Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
900 views
in Technique[技术] by (71.8m points)

nginx 日志可以打印请求实际被转发的路径吗

nginx配置了几个location时,如果报错,怎么确定是不是正确匹配到了想要的location,或者是location中路径配置有错误。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

access_log参数的标签段位置:

 http, server, location, if in location, limit_except

所以你在不同的location下,配置成不同的access_log或不同的format 就可以了。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...