Logging POST data from $request_body and returning 200
barretto_chris
nginx-forum at nginx.us
Fri Feb 25 03:15:16 MSK 2011
I am able to log POST data correctly with the following code:
location /bk {
if ($request_method != POST) {
return 405;
}
proxy_pass $scheme://127.0.0.1:$server_port/dummy;
log_format my_tracking $request_body;
access_log /mnt/logs/nginx/my.access.log my_tracking;
}
location /dummy { set $test 0; }
but the requester gets a 404 return code. I'd like to return a 200 but
when I make the following change:
location /bk {
if ($request_method != POST) {
return 405;
}
proxy_pass $scheme://127.0.0.1:$server_port/dummy;
log_format my_tracking $request_body;
access_log /mnt/logs/nginx/my.access.log my_tracking;
return 200;
}
location /dummy { set $test 0; }
The logs are recording blank data. Any ideas on record the data with
returning a 200?
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,178228,178228#msg-178228
More information about the nginx
mailing list