日志为自定义格式,格式如下: log_format proxy '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent $request_time $request_length "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" "$upstream_cache_status" "$scheme"';
set_real_ip_from 0.0.0.0/0;
real_ip_header X-Forwarded-For;
报错信息如下:
==================================================================★[2023/11/28 09:54:20],切割日志==================================================================|--当前保留最新的[4]份|-正在处理网站: zx.xxx.comTraceback (most recent call last): File "/www/server/panel/script/logsBackup", line 127, in <module> split_all(num) File "/www/server/panel/script/logsBackup", line 121, in split_all split_log(site['name'], save) File "/www/server/panel/script/logsBackup", line 44, in split_log logsPath = re.findall('access_log\s+([^;]+){}\.log;'.format(siteName), config)[0]IndexError: list index out of range
|
|