[Nginx] nginx configuration json format log

nginx.conf module configuration log_format:

log_format main'{
“@timestamp”:”$time_iso8601″,
“host”:”$server_addr”,
“clientip”:”$remote_addr”,
“remote_user”:”$remote_user”,
“request”:”$ request”,
“http_user_agent”:”$http_user_agent”,
“size”:”$body_bytes_sent”,
“responsetime”:”$request_time”,
“upstreamtime”:”$upstream_response_time”,
“upstreamhost”:”$upstream_addr”,
“http_host”:”$host”,
“url”:”$uri”,
“domain”:”$ host”,
“xff”:”$http_x_forwarded_for”,
“referer”:”$http_referer”,
“status”:”$status”
}’;

After configuration, perform the following format verification: ../ sbin/nginx -t

After the verification is successful, reload the configuration: ../sbin/nginx -s reload

The log is shown as follows:

Share pictures

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 4661 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.