Logging POST body

I am using ngixing as a reverse proxy in front of apache (PHP) as a load
balancer and a logger. For some endpoints, I want to log their POST
bodies
and I looked up the Web and found some solution requiring to install
HttpEchoModule. Is there any other way of achieving this? Preferably
without
installing any new module?

Posted at Nginx Forum:

hi,

did you even tried too google it?

dork: “logging post body nginx”

cheers,

mex

Posted at Nginx Forum:

Hello!

On Wed, Oct 15, 2014 at 12:50:23PM -0400, keeyong wrote:

I am using ngixing as a reverse proxy in front of apache (PHP) as a load
balancer and a logger. For some endpoints, I want to log their POST bodies
and I looked up the Web and found some solution requiring to install
HttpEchoModule. Is there any other way of achieving this? Preferably without
installing any new module?

Yes, you can access a request body either via $request_body
variable, or with, if it’s saved to a file, via $request_body_file
variable.

Related documentation links:

http://nginx.org/r/$request_body
http://nginx.org/r/$request_body_file
http://nginx.org/r/client_body_in_file_only
http://nginx.org/r/client_body_buffer_size


Maxim D.
http://nginx.org/