• nginx 1.4.7 发送日志到rsyslog


    <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;
    


    
    
    
    
    
    
    
                                        
    
  • 相关阅读:
    hdu 2897 巴什博弈变形
    hdu 2516 FIB博弈模型
    zoj 1904 Beavergnaw 计算圆柱和圆台的体积
    zoj 1806 This Takes the Cake 计算凸四边形和三角形的面积
    zoj 1608 Two Circles and a Rectangle 判断两个圆是否能放入一个矩形中
    zoj 1439 Area Ratio 计算三角形内接圆面积和外接圆面积之比
    zoj 1199 Point of Intersection 求两个圆公切线的交点
    poj 1584 A Round Peg in a Ground Hole 判断多边形是否为凸多边形 + 圆心是否在凸多边形内 + 圆是否在凸多边形内部
    Django-Xadmin
    Django组件-分页器
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13350432.html
Copyright © 2020-2023  润新知