在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就行了
「点点赞赏,手留余香」
声明:本文为原创文章,版权归旷野小站所有,欢迎分享本文,转载请保留出处!
你可能也喜欢
- ♥ 用Chatwoot自建网站客服系统12/15
- ♥ rsync命令带端口参数的书写格式12/19
- ♥ linux下查看目录所在的分区命令11/03
- ♥ 关于linux的一些常用命令基于ubuntu22.0411/25
- ♥ Linux 系统下使用 systemd 控制 frps 及配置开机自启12/07
- ♥ nps安装教程11/28