{"id":51812,"date":"2023-06-01T18:05:39","date_gmt":"2023-06-01T10:05:39","guid":{"rendered":"http:\/\/lrxjmw.cn\/?p=51812"},"modified":"2023-06-01T18:05:39","modified_gmt":"2023-06-01T10:05:39","slug":"nginx-log","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/nginx-log.html","title":{"rendered":"\u4f60\u9020\u5417\uff0c\u5982\u4f55\u7eaf\u624b\u5de5\u73a9\u8f6c Nginx \u65e5\u5fd7\uff01"},"content":{"rendered":"
\u5bfc\u8bfb<\/td>\n | Nginx \u65e5\u5fd7\u5bf9\u4e8e\u5927\u90e8\u5206\u4eba\u6765\u8bf4\u662f\u4e2a\u672a\u88ab\u53d1\u6398\u7684\u5b9d\u85cf\uff0c\u603b\u7ed3\u4e4b\u524d\u505a\u67d0\u65e5\u5fd7\u5206\u6790\u7cfb\u7edf\u7684\u7ecf\u9a8c\uff0c\u548c\u5927\u5bb6\u5206\u4eab\u4e00\u4e0b Nginx \u65e5\u5fd7\u7684\u7eaf\u624b\u5de5\u5206\u6790\u65b9\u5f0f\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n <\/p>\n Nginx \u65e5\u5fd7\u5bf9\u4e8e\u5927\u90e8\u5206\u4eba\u6765\u8bf4\u662f\u4e2a\u672a\u88ab\u53d1\u6398\u7684\u5b9d\u85cf\uff0c\u603b\u7ed3\u4e4b\u524d\u505a\u67d0\u65e5\u5fd7\u5206\u6790\u7cfb\u7edf\u7684\u7ecf\u9a8c\uff0c\u548c\u5927\u5bb6\u5206\u4eab\u4e00\u4e0b Nginx \u65e5\u5fd7\u7684\u7eaf\u624b\u5de5\u5206\u6790\u65b9\u5f0f\u3002<\/p>\n Nginx \u65e5\u5fd7\u76f8\u5173\u914d\u7f6e\u6709 2 \u4e2a\u5730\u65b9\uff1aaccess_log \u548c log_format \u3002<\/p>\n \u9ed8\u8ba4\u7684\u683c\u5f0f\uff1a<\/strong><\/span><\/div>\n access_log \/data\/logs\/nginx-access.log;\r\n\r\nlog_format old '$remote_addr [$time_local] $status $request_time $body_bytes_sent '\r\n '\"$request\" \"$http_referer\" \"$http_user_agent\"';<\/pre>\n |