How to log POST body data?
John Watson
john at disqus.com
Mon Jul 15 03:50:46 UTC 2013
Hi,
Trying adding this directive to your location:
echo_read_request_body;
It needs this 3rd party module though:
http://wiki.nginx.org/HttpEchoModule#echo_read_request_body
On Sun, Jul 14, 2013 at 7:23 AM, shawnxzhou <nginx-forum at nginx.us> wrote:
> I'm trying to use $request_body but get '-' in my log file for this field
> here is my configure file, is there sth wrong or the $request_body has
> other
> deps to work?
>
> http {
> log_format client '$remote_addr - $remote_user $request_time
> $upstream_response_time '
> '[$time_local] "$request" $status $body_bytes_sent
> $request_body "$http_referer" '
> '"$http_user_agent" "$http_x_forwarded_for"';
> ......
> server {
> ......
> location = /c.gif {
> empty_gif;
> access_log logs/uaa_access.log client;
> }
> ......
> }
> }
>
> I'm using linux command 'curl -d name=xxxx myip/my_location' to fire a POST
> request, and just get '-' for $request_body field.
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?2,240828,240828#msg-240828
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20130714/63683be5/attachment.html>
More information about the nginx
mailing list