宝塔的nginx.conf配置中加上下面一行log_format main 'CDN_IP:$remote_addr - CLIENT_IP:$HTTP_X_FORWARDED_FOR - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"'; 每个网站的配置文件中的access_log项上追加一个”main“ OYO Archives QR Code