<pre name="code" class="html">tar -xzf nginx-1.4.7.tar.gz
# cd nginx-1.4.77
# ./configure --user=nginx --group=nginx --prefix=/usr/local/nginx \
--with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module \
--with-pcre=/root/pcre-8.36 --with-http_realip_module front-end:/root/nginx-1.4.7# patch -p1 </root/nginx_syslog_patch/syslog_1.4.0.patch
patching file src/core/ngx_cycle.c
patching file src/core/ngx_log.c
patching file src/core/ngx_log.h
patching file src/http/modules/ngx_http_log_module.c
patching file src/http/ngx_http_core_module.c
Hunk #2 succeeded at 4895 (offset 2 lines).
Hunk #3 succeeded at 4913 (offset 2 lines).
Hunk #4 succeeded at 4952 (offset 2 lines).
patching file src/http/ngx_http_request.c
Hunk #1 succeeded at 517 (offset -14 lines).
Hunk #2 succeeded at 798 (offset -23 lines).
Hunk #3 succeeded at 2002 (offset -23 lines).
front-end:/root/nginx-1.4.7# 重新编译nginx: ./configure --user=nginx --group=nginx --prefix=/usr/local/nginx \
--with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module \
--with-pcre=/root/pcre-8.36 --with-http_realip_module --add-module=/root/nginx_syslog_patch/ front-end:/root/nginx-1.4.7# nginx -V
nginx version: nginx/1.4.7
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC)
TLS SNI support enabled
configure arguments: --user=nginx --group=nginx --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module --with-pcre=/root/pcre-8.36 --with- http_realip_module
front-end:/root/nginx-1.4.7# /usr/local/nginx/sbin/nginx -V
nginx version: nginx/1.4.7
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC)
TLS SNI support enabled
configure arguments: --user=nginx --group=nginx --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module --with-pcre=/root/pcre-8.36 --with- http_realip_module --add-module=/root/nginx_syslog_patch/ nginx 配置: syslog local6 nginx;
#send the log to syslog and file.
access_log syslog:notice|logs/access.log main; # pre 1.5.x
error_log syslog:notice|logs/error.log;
sendfile on;
tcp_nopush on;



												

nginx 1.4.7 发送日志到rsyslog的更多相关文章

  1. Linux日志管理系统rsyslog

    一.日志的概念 什么是日志?日志就是历史事件.历史事件包括时间.地点.人物.时间.这个是生活中所说的日志很好理解.在Linux中也有类似的服务,它主要作用就是记录Linux系统的历史事件,包括什么时间 ...

  2. 集中日志服务器Rsyslog

    http://www.gaizaoren.org/archives/408 基于主机的管理一般需要收集服务器的日志信息用于及时发现错误,处理故障. 搭建linux下的集中日志服务器的程序一般可以用sy ...

  3. nginx+lua+kafka 编写 在线日志上报系统

    案例一 rewrite_by_lua ' --引入openresty自带的json处理对象 local cjson = require("cjson") local produce ...

  4. nginx启用TCP反向代理日志配置

    Nginx使用TCP反向代理日志配置不同于http 修改nginx配置文档/usr/local/nginx/conf/nginx.conf 设置日志格式 stream { log_format pro ...

  5. ELKStack入门篇(二)之Nginx、Tomcat、Java日志收集以及TCP收集日志使用

    1.收集Nginx的json格式日志 1.1.Nginx安装 [root@linux-node1 ~]# yum install nginx -y [root@linux-node1 ~]# vim ...

  6. Nginx实战(三) 日志配置与切割

    访问日志主要记录客户端访问Nginx的每一个请求,格式可以自定义.通过访问日志,你可以得到用户地域来源.跳转来源.使用终端.某个URL访问量等相关信息. Nginx中访问日志相关指令主要有两条,一条是 ...

  7. nginx中有关命令和日志切割,配置文件加载的详细阐述

    一.Nginx简介 Nginx (“engine x”) 是俄罗斯人Igor Sysoev(塞索耶夫)编写的一款高性能的 HTTP 和反向代理服务器.Nginx 已经在俄罗斯最大的门户网站── Ram ...

  8. Nginx 配置埋点js日志采集

    页面埋点&nginx日志采集 页面(web容器:httpd/nginx负载均衡 + apache server)<===> 日志采集服务器(nginx服务器) 通过某个页面跳转到我 ...

  9. nginx 默认配置语法和日志的format

    nginx 默认配置 查看有nginx哪些默认配置文件,打开/etc/nginx/nginx.conf文件,查看尾行部分 会默认将/etc/nginx/conf.d/文件下其他以.conf结尾的配置文 ...

随机推荐

  1. QF——iOS程序运行原理(APP的生命周期)

    iOS程序的运行原理: main.m: 1. main.m 主函数是所有程序的入口函数. 2. 在main函数里是UIApplicationMain函数,开启了一个无限循环,以监听该应用. 该UIAp ...

  2. CentOs 安装 Nginx + php + mysql (推荐方式)

    本文全部采用yum进行安装, CentOs6.5 mini 版本. 一.更改yum源为网易的源加快速度, 如果是从网易镜像下载的安装包,直接注释这几项也可以 vim /etc/yum.repos.d/ ...

  3. Android 开发中常用小技巧

    TextView中的getTextSize返回值是以像素(px)为单位的, 而setTextSize()是以sp为单位的. 所以如果直接用返回的值来设置会出错,解决办法是 用setTextSize() ...

  4. MVC+JSON 无限滚动翻页

    public partial class News { public int ID{ get; set; } public int Title{ get; set; } } ) { Response. ...

  5. 3000本IT书籍下载地址

    http://www.shouce.ren/post/d/id/112300    黑客攻防实战入门与提高.pdfhttp://www.shouce.ren/post/d/id/112299    黑 ...

  6. SVN利用Hooks自动发布网站

    出于管理需要,也需要在公司内部实现自动发布流程.当开发机提交SVN代码之后,自动同步到测试服务器进行测试. 网络的拓扑简化为: 1台核心SVN服务器,使用的svn管理软件为Subversion Edg ...

  7. append与after

    apend与apendTo就如同after与insertAfter,表达意思相同,表达不同.A.after(B)=B.insertAfter(A).apend在元素里面添加,after在元素外面添加. ...

  8. saiku中多cube排序问题

    如题,一个schema中如果有多个cube(常有),那cube之间是如何排序显示的? 我们看一下OlapMetaExplorer.java文件的getConnection方法,其中有一行 Collec ...

  9. CSS3立体文字最佳实践

    前端开发whqet,csdn,王海庆,whqet,前端开发专家 上一篇的<纯CSS3文字效果推荐>文章里面推荐了8款纯css实现的文字效果,当中3d文字效果最为流行,限于篇幅只展示了其3D ...

  10. 关于cocos2d安装时编译不成功(个人心得)

    在解压cocos2d执行vs2010.sln时错误发生不能成功生成.遇到这样的错误: 1>c:\program files\microsoft sdks\windows\v7.0a\includ ...