{"id":118749,"date":"2018-09-07T08:07:46","date_gmt":"2018-09-07T00:07:46","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=118749"},"modified":"2018-08-31T09:08:56","modified_gmt":"2018-08-31T01:08:56","slug":"nginx-log-jianjie","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/nginx-log-jianjie.html","title":{"rendered":"nginx access_log\u65e5\u5fd7\u7b80\u4ecb"},"content":{"rendered":"
\u5bfc\u8bfb<\/td>\n | nginx \u65e5\u5fd7\u4e3b\u8981\u6709\u4e24\u6761\u6307\u4ee4\uff1a1\uff09log_format\uff1a\u7528\u6765\u8bbe\u7f6e\u65e5\u5fd7\u683c\u5f0f\uff1b2\uff09access_log\uff1a\u7528\u6765\u6307\u5b9a\u65e5\u5fd7\u6587\u4ef6\u7684\u5b58\u653e\u8def\u5f84\u3001\u683c\u5f0f<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n log_format \u65e5\u5fd7\u683c\u5f0f<\/div>\n 1\u3001\u8bed\u6cd5\uff1a<\/strong><\/span><\/div>\n log_format name\uff08\u683c\u5f0f\u540d\u5b57\uff09 \u683c\u5f0f\u6837\u5f0f\uff08\u5373\u60f3\u8981\u5f97\u5230\u4ec0\u4e48\u6837\u7684\u65e5\u5fd7\u5185\u5bb9\uff09 log_format main\r\n'$remote_addr - $remote_user [$time_local] \"$request\" '\r\n'$status $body_bytes_s ent \"$http_referer\" '\r\n'\"$http_user_agent\" \"$http_x_forwarded_for\"'\r\n<\/pre>\n |