Welcome! Log In Create A New Profile

Advanced

Re: How to log POST body data?

July 15, 2013 02:00AM
Followups,
I used echo_read_request_body; and the empty_gif directive seems not work again, they shoud be exclusive in a location?


John Watson Wrote:
-------------------------------------------------------
> 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@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@nginx.org
> > http://mailman.nginx.org/mailman/listinfo/nginx
> >
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
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: 48
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