• 蒲公英v5p%n搭建局域网后用nginx做代理的配置 + nginx日志分片 切割


    1.nginx.conf

    worker_processes  auto;
    error_log  /usr/local/var/log/nginx/error.log;
    events {
        worker_connections  1024;
    }
    http {
        include       mime.types;
        default_type  application/octet-stream;
        #default_type text/html;
    
        client_max_body_size 2G;
        server_names_hash_bucket_size 256;
        sendfile        on;
        keepalive_timeout  65;
        log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                                            '"$status" $body_bytes_sent "$http_referer" '
                                            '"$http_user_agent" "$http_x_forwarded_for" '
                                            '"$gzip_ratio" $request_time $bytes_sent $request_length';
        underscores_in_headers on;
        include /usr/local/etc/nginx/conf.d/*.conf;
    }

    2.代理的vhost的配置

    1.1 代理zabbix
    server {
            listen       60001;
            server_name  localhost;
            #charset koi8-r;
            #access_log  logs/host.access.log  main;
           location / {
                index  index.html index.htm;
                proxy_pass http://10.253.124.21:8111;
                proxy_connect_timeout 3000s;
                proxy_send_timeout 3000s;
                proxy_read_timeout 3000s;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
                proxy_http_version 1.1;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header Host $host;
                client_max_body_size    100m;
           }
    }
    1.2 代理jenkins--(url带后缀)
    server {
            listen       8888;
           server_name  172.19.134.43;
            #charset koi8-r;
            #access_log  logs/host.access.log  main;
           location /jenkins {
                index  index.html index.htm;
                proxy_pass http://10.253.124.22:8888/jenkins;
                proxy_connect_timeout 3000s;
                proxy_send_timeout 3000s;
                proxy_read_timeout 3000s;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
                proxy_http_version 1.1;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header Host $host;
                client_max_body_size    100m;
           }
    }
  • 相关阅读:
    Lua脚本语法说明(修订)
    C++ 程序文档生成器介绍(doxygen)
    [转]最快速度找到内存泄漏
    MyEclipse 8.5下安装tomcat插件
    Linux解压rar文件(unrar安装和使用,分卷解压)
    禁止root用户远程登录或者禁止其他用户登录而不删除它
    linux配置IP的方法
    log4j xml配置详解
    Sqlldr使用介绍
    Linux查看CPU和内存使用情况
  • 原文地址:https://www.cnblogs.com/hixiaowei/p/10950590.html
Copyright © 2020-2023  润新知