在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就行了
本文为原创文章,版权归旷野小屋_123ppp资源网所有,欢迎分享本文,转载请保留出处!
你可能也喜欢
- ♥ 云计算运维教程学习笔记04/25
- ♥ rsync命令带端口参数的书写格式12/19
- ♥ 使用 Cravatar 解决 Gravatar 头像无法访问的问题12/22
- ♥ mysql删除log日志文件命令02/06
- ♥ WordPress 技巧:屏蔽站点Feed12/22
- ♥ lsyncd-实时同步11/01