Welcome! Log In Create A New Profile

Advanced

problem: logging POST data in nginx 0.7.65 with 200 return code

Posted by vyom 
problem: logging POST data in nginx 0.7.65 with 200 return code
March 13, 2012 04:46PM
Hi,

I am trying to log POST data through this configuration in nginx.conf.

server {
log_format myformat $request_body;
....
....
location /myresponse {
return 200;
}

location =/mypage {
if ($request_method != POST) {
return 405;
}
proxy_pass http://127.0.0.1:$server_port/myresponse;
access_log logs/myformat.log myformat;
}
}

I have googled a lot and tried almost all directives (right from resolve, internal, to checking firewall, setting request headers etc.) but nothing worked. I have nginx version 0.7.65. This same config works with the latest version of nginx.
Is there any hack to make the same work with nginx 0.7.65 also?

I can see the logged data but I get back a return code 405.

Thanks,
~ Vyom



Edited 1 time(s). Last edit at 03/13/2012 04:49PM by vyom.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 175
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