goaccess分析nginx日志
定义nginx日志格式为默认格式:
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
# yum -y install goaccess
# goaccess -f access.log --log-format=COMBINED -a > access.html
--log-format=COMBINED 选择日志格式为混合模式