ky818smKy818sm  2023-04-14 19:52 旷野小屋_123ppp资源网 隐藏边栏 |   抢沙发  2 
文章评分 0 次,平均分 0.0

在server段外面自定义一个日志格式
log_format cdn '$http_x_forwarded_for - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent"';

修改对应虚拟机的 access_log /home/wwwlogs/xxxx.log; 为 access_log /home/wwwlogs/xxxx.log cdn;
重启nginx就行了

本文为原创文章,版权归所有,欢迎分享本文,转载请保留出处!

声明:如果本站发布的内容侵犯到您的权益,请通过邮件【[email protected]】联系本站,我们将及时删除!

发表评论

表情 格式 链接 私密 签到