<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. [一道搜狗输入法的面试题]C++转换构造函数和类型转换函数

    今天面试遇到一道有关C++转换构造函数的题目,之前经常见到默认构造函数.拷贝构造函数.析构函数,但是从没听说过转换构造函数,隐式转换函数也是一样,C++的确是够博大精深的,学习之路很长啊! 其实我们已 ...

  2. Linux学习之域名解析命令

    (1) /etc/hosts :记录hostname对应的ip地址 /etc/resolv.conf :设置DNS服务器的ip地址 /etc/host.conf :指定域名解析的顺序(是从本地的hos ...

  3. Android 更好的Activity生命周期回调

    /** * This class allows you to listen to when the user is entering the background (i.e. after a home ...

  4. js私有化属性

    我们先来看一个例子: var Demo1 = function(val){ this.value = val; this.getValue = function(){ return this.valu ...

  5. ASP.NET Identity 系列笔记目录

    编写目的 混迹博客园已经有一段时间了,一直都是在学习各路大神的文章,自己却没有做出什么贡献,所以觉得应该写一点点内容和大家一起分享.但是本人实在才疏学浅,有心无力啊!正好最近在学习 Microsoft ...

  6. [虚拟化/云][全栈demo] 为qemu增加一个PCI的watchdog外设(三)

    我们已经设计了一个基于qemu的watchdog了.下一步工作就是创建一个含有我们的watchdog的虚拟计算机器了. 准备工作: 1. 使用virt-manager或者virsh创建一个虚拟机器. ...

  7. _extend用法总结

    针对对象数组: 后面的属性会覆盖更新前面的属性 看代码: <!DOCTYPE html> <html> <head> <meta charset=" ...

  8. javascript第二课javascript规范

    1.javascript严格区分大小写 2.声明变量一律使用var 推断类型 3.每条语句后面加分号 4.字符串使用单引号 5.html代码使用双引号,js用单引号

  9. POJ 3111 K Best(最大化平均值)

    题目链接:click here~~ [题目大意]有n个物品的重量和价值各自是Wi和Vi.从中选出K个物品使得单位重量的价值最大,输出物品的编号 [解题思路]:最大化平均值的经典.參见click her ...

  10. 关于java同步包中ConcurrentLinkedQueue类的深入分析与理解

    一,官方描写叙述 一个基于连接节点的无界线程安全队列.这个队列的顺序是先进先出.队列头部的元素是留在队列中时间最长的,队列尾部的元素是留在队列中时间最短的.新元素被插入到元素的尾部,队列从队列的头部检 ...