From 1b79f6d22c918813ec6a19a381819260e60f71c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B0=8F=E4=BA=91?= Date: Mon, 19 May 2025 10:48:33 +0800 Subject: [PATCH] xxx --- nginx/vhosts/logging.conf | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 nginx/vhosts/logging.conf diff --git a/nginx/vhosts/logging.conf b/nginx/vhosts/logging.conf deleted file mode 100644 index 437e66b..0000000 --- a/nginx/vhosts/logging.conf +++ /dev/null @@ -1,31 +0,0 @@ -# 定义日志格式 -log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for" ' - '$request_time $upstream_response_time'; - -log_format json_combined escape=json '{' - '"timestamp":"$time_iso8601",' - '"remote_addr":"$remote_addr",' - '"remote_user":"$remote_user",' - '"request":"$request",' - '"status": "$status",' - '"body_bytes_sent":"$body_bytes_sent",' - '"http_referer":"$http_referer",' - '"http_user_agent":"$http_user_agent",' - '"http_x_forwarded_for":"$http_x_forwarded_for",' - '"request_time":"$request_time",' - '"upstream_response_time":"$upstream_response_time"' - '}'; - -# 访问日志配置 -access_log /var/log/nginx/access.log main buffer=32k flush=5s; -access_log /var/log/nginx/access.json.log json_combined buffer=32k flush=5s; - -# 错误日志配置 -error_log /var/log/nginx/error.log warn; - -# 开启压缩日志功能 -gzip on; -gzip_disable "msie6"; -gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript; \ No newline at end of file