日志模塊的說明
日志的默認路徑:error_log /var/log/nginx/error.log warn; warn是指日志的等級,一般有debug, info, notice, warn, error, crit。access_log /var/log/nginx/access.log main; main是指訪問日志記錄的格式信息,在http模塊中log_format main '$remote_addr - $remote_user [$time_local] "$request" ''$status $body_bytes_sent "$http_referer" ''"$http_user_agent" "$http_x_forwarded_for"';
Nginx日志變量:http請求變量(request):arg_PARAMETER()、http_HEADER、sent_http_HEADER(服務端返回客戶端response)內置變量:Nginx內置變量 官網有說明自定義變量:自己定義的變量
轉載于:https://blog.51cto.com/11512826/2057907