Setup Debug Log on Nginx

Nginxdebug,Nginx

Add the following entry in “http{}" block on the /etc/nginx/nginx.conf

log_format debug_val_format "$debug_val";


In the “server{}" block , for example, set the following entries.

#For debugging
set $debug_val "value is :$valiable";
access_log /var/log/nginx/debug_val.log debug_val_format;

In this example, the value of “$valiable" will be shown in the debug_val.log.

Nginxdebug,Nginx

Posted by Kei