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.
Subject Author Posted

How to log POST body data?

shawnxzhou July 14, 2013 10:23AM

Re: How to log POST body data?

John Watson July 14, 2013 11:52PM

Re: How to log POST body data?

shawnxzhou July 15, 2013 01:33AM

Re: How to log POST body data?

shawnxzhou July 15, 2013 02:00AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 298
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready