Sending Traffic to another Server/Port/IP asynchronously
rishabh
nginx-forum at nginx.us
Mon Mar 19 10:08:15 UTC 2012
That logging issue was a mistake. All the access_log directive need to
be in a single location/server block.
After a lot of testing. I found an issue.
The processing time of post_action is added to the response time. hence
delaying the response.
Here is how i have used post_action to log.
http {
server {
location / {
proxy_pass http://upstream123;
post_action @loglua;
}
location @loglua {
set $log '';
rewrite_by_lua_file /nginx/mylua.lua;
logformat format1 '$log';
access_log /var/log/nginx/newlog.log format1;
}
}
}
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,222196,224021#msg-224021
More information about the nginx
mailing list