ICode9

精准搜索请尝试: 精确搜索
首页 > 系统相关> 文章详细

离线linux主机下安装 openresty

2022-06-29 15:31:43  阅读:261  来源: 互联网

标签:log linux 离线 proxy openresty upstream gzip time size


资源:

 

https://files.cnblogs.com/files/abelkeith/openresty-x86_64.zip

 

安装命令:

  yum install *.rpm -y

 

配置4层和7层代理的模板文件

user nobody nobody;
worker_processes  4;
events {
    worker_connections  102400;
    use epoll;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    real_ip_header X-Forwarded-For;

    log_format  main  '$time_local ||  $remote_addr || $upstream_addr || $status || $host ||  $request_time || $upstream_status || $upstream_response_time '
                      ' || $upstream_cache_status || $body_bytes_sent || $http_referer '
                      ' || $remote_user || $http_user_agent '
                      ' || $http_x_forwarded_for || $request';
                            #access_log  logs/access.log  main;

    sendfile        on;
    keepalive_timeout 15;
    server_names_hash_bucket_size 128;
    tcp_nopush     on;
    tcp_nodelay on;
    server_tokens off;
    charset utf8;
    underscores_in_headers on;
    proxy_next_upstream off;
    proxy_read_timeout 300;
    proxy_send_timeout 300;
    proxy_buffer_size 16k;
    proxy_buffers 4 16k;
    proxy_busy_buffers_size 32k;
    proxy_temp_file_write_size 32k;
    proxy_temp_path tmp/proxy_temp;
    proxy_ignore_client_abort on;

    client_header_buffer_size 2k;
    large_client_header_buffers 4 16k;
    client_max_body_size 200m;

    gzip on;
    gzip_min_length 2k;
    gzip_buffers 4 16k;
    gzip_comp_level 2;
    gzip_types text/js image/jpeg image/png text/plain text/css text/javascript;
    gzip_vary on;
    gzip_proxied expired no-cache no-store private auth;

    include vhost/*/*.conf;
}
stream {
    
    log_format proxy '$remote_addr [$time_local]'
                '$protocol $status $bytes_sent $bytes_received'
                '$session_time "$upstream_addr" '
                '"$upstream_bytes_sent" "$upstream_bytes_received" "$upstream_connect_time"';
    access_log /data/wwwlogs/tcp-access.log proxy ;
    error_log  /data/wwwlogs/tcp-error.log warn ; 
    include stream/*/*.conf;
}

 

标签:log,linux,离线,proxy,openresty,upstream,gzip,time,size
来源: https://www.cnblogs.com/abelkeith/p/16423565.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有