Welcome! Log In Create A New Profile

Advanced

How to log POST body data?

July 14, 2013 10:23AM
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.
SubjectAuthorPosted

How to log POST body data?

shawnxzhouJuly 14, 2013 10:23AM

Re: How to log POST body data?

John WatsonJuly 14, 2013 11:52PM

Re: How to log POST body data?

shawnxzhouJuly 15, 2013 01:33AM

Re: How to log POST body data?

shawnxzhouJuly 15, 2013 02:00AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 81
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 229 on August 01, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready