在 2017年5月5日,下午11:42,fozhyn <fo...@gmail.com> 写道:自定义error page , 在server中包含如下配置:proxy_intercept_errors on;error_page 404 /404.html;location = /404.html{ root /var/nginx/html/404;}access_by_lua阶段使用ngx.exit(404)退出,客户端可收到自定义的404页面,但是问题在于进入了新的location,之前location的log_by_lua不会执行。有什么好办法解决这个问题? -- --
hello,log_by_lua可放置在server块上,这可让所有的location都有执行log_by_lua在 2017年5月5日,下午11:42,fozhyn <fo...@gmail.com> 写道:自定义error page , 在server中包含如下配置:proxy_intercept_errors on;error_page 404 /404.html;location = /404.html{ root /var/nginx/html/404;}access_by_lua阶段使用ngx.exit(404)退出,客户端可收到自定义的404页面,但是问题在于进入了新的location,之前location的log_by_lua不会执行。有什么好办法解决这个问题? -- --
在 2017年5月5日,下午11:42,fozhyn <fo...@gmail.com> 写道:自定义error page , 在server中包含如下配置:proxy_intercept_errors on;error_page 404 /404.html;location = /404.html{ root /var/nginx/html/404;}access_by_lua阶段使用ngx.exit(404)退出,客户端可收到自定义的404页面,但是问题在于进入了新的location,之前location的log_by_lua不会执行。有什么好办法解决这个问题? --
ngx.var.VARIABLE 记录信息,虽然 ngx.ctx 这个的限制也确实是可以绕过去的
这样会有其他问题,我在ngx.ctx里面记录了一些写日志需要的信息。Kwanhur Huang <huang_...@163.com>于2017年5月7日周日 下午12:19写道:hello,log_by_lua可放置在server块上,这可让所有的location都有执行log_by_lua在 2017年5月5日,下午11:42,fozhyn <foz...@gmail.com> 写道:自定义error page , 在server中包含如下配置:proxy_intercept_errors on;error_page 404 /404.html;location = /404.html{ root /var/nginx/html/404;}access_by_lua阶段使用ngx.exit(404)退出,客户端可收到自定义的404页面,但是问题在于进入了新的location,之前location的log_by_lua不会执行。有什么好办法解决这个问题? -- --
hello,log_by_lua可放置在server块上,这可让所有的location都有执行log_by_lua在 2017年5月5日,下午11:42,fozhyn <foz...@gmail.com> 写道:自定义error page , 在server中包含如下配置:proxy_intercept_errors on;error_page 404 /404.html;location = /404.html{ root /var/nginx/html/404;}access_by_lua阶段使用ngx.exit(404)退出,客户端可收到自定义的404页面,但是问题在于进入了新的location,之前location的log_by_lua不会执行。有什么好办法解决这个问题? -- --
在 2017年5月5日,下午11:42,fozhyn <foz...@gmail.com> 写道:自定义error page , 在server中包含如下配置:proxy_intercept_errors on;error_page 404 /404.html;location = /404.html{ root /var/nginx/html/404;}access_by_lua阶段使用ngx.exit(404)退出,客户端可收到自定义的404页面,但是问题在于进入了新的location,之前location的log_by_lua不会执行。有什么好办法解决这个问题? --