前提:
lua中开启bug;
daemon off;
master_process off;
worker_rlimit_core 500M;
working_directory /opt/WiseGrid/smartl7/sbin;
error_log /var/log/smartl7/smartl7.log debug_http;
直接看日志:
/var/log/smartl7/smartl7.log
smartl7.conf一个location中配置:
rewrite_by_lua '
if (smartl7.req.get_method() == "GET")
then
smartl7.exit(smartl7.HTTP_FORBIDDEN);
end
';
header_filter_by_lua '
if (smartl7.req.get_method() == "GET")
then
smartl7.error_page("/Forbidden.html"); //ngx_http_lua_ngx_error_page
end
';
既然rewrite_by_lua中已经返回错误码了, 那么http流程到了filt