Sto tentando di registrare il corpo POST e aggiungere $request_body
alla clausola log_format
nella clausola http
, ma il comando access_log
stampa solo "-" come il corpo dopo mando richiesta POST utilizzando:Really logging del corpo della richiesta POST (invece di "-") con nginx
curl -d name=xxxx myip/my_location
mio log_format (in http
clausola):
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"';
La mia posizione definizione (nella clausola server):
location = /c.gif {
empty_gif;
access_log logs/uaa_access.log client;
}
Come posso stampare i dati POST effettivi dall'arricciatura?
Suoni come questi ragazzi hanno trovato una soluzione: http://stackoverflow.com/questions/4939382/logging-post-data-from-request-body – aet