Welcome! Log In Create A New Profile

Advanced

почему в лог не пишется request_body ?

Eugene Klimov
November 16, 2017 08:26AM
Всем привет, скажите пожалуйста, а какие есть ограничения на запись в
лог request_body кроме тех кто написаны вот тут?
http://nginx.org/ru/docs/http/ngx_http_core_module.html#var_request_body

# nginx -v
nginx version: nginx/1.12.0

у меня вот есть такой конфиг (не мое. в наследство достался)


log_format format_json escape=json
'{"remote_addr":"$remote_addr","remote_user":"$remote_user","time_local":"$time_iso8601","msec":
$msec,"request":"$request","request_uri":"$request_uri","status":"$status","body_bytes_sent":"$body_bytes_sent",
"referer":"$http_referer","user_agent":"$http_user_agent",
"req_time":$request_time,"uid_got":"$uid_got","uid_set":"$uid_set",
"apic":"$cookie_spjsapicall","sndraw":"$cookie_spsenderaway","upstream_time":
$upstream_response_time, "request_body": "$request_body",
"content_length":"$content_length","request_body_file":"$request_body_file","upstream_addr":"$upstream_addr","ssl_protocol":"$ssl_protocol"}';

server {
listen 80;
server_name xxx.ru;

location ~ ^/integration/xxx/ {
proxy_pass
http://mybackend_integrations_xxx;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 600;

access_log /home/nginx/log/xxx-integration-json.log format_json;
client_max_body_size 30m;
client_body_buffer_size 1m;
client_body_in_file_only off;
client_body_in_single_buffer on;
}

}

почему в логе у меня пишется вот такое?

"request_body":
"","content_length":"105715","request_body_file":"/var/cache/nginx/client_temp/0006557331","upstream_addr":"10.216.130.28:80","ssl_protocol":""}


выглядит так будто директивы client_body_* для моего location просто
не срабатывают и все все равно пишется в tmp файл?
что еще я забыл?
_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

почему в лог не пишется request_body ?

Eugene Klimov November 16, 2017 08:26AM

Re: почему в лог не пишется request_body ?

Maxim Dounin November 16, 2017 11:12AM

Re: почему в лог не пишется request_body ?

ALex_hha November 16, 2017 11:16AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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