www.cnblogs.com/ruiyqinrui

开源、架构、Linux C/C++/python AI BI 运维开发自动化运维。 春风桃李花 秋雨梧桐叶。“力尽不知热 但惜夏日长”。夏不惜,秋不获。@ruiY--秦瑞

python爬虫,C编程,嵌入式开发.hadoop大数据,桉树,onenebula云计算架构.linux运维及驱动开发.

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
server {
    listen 80;
    server_name _;

    #将请求转成https
    #rewrite ^(.*)$ https://$host$1 permanent;

    gzip on;
    gzip_static on;     # 需要http_gzip_static_module 模块
    gzip_min_length 1k;
    gzip_comp_level 4;
    gzip_proxied any;
    gzip_types text/plain text/xml text/css;
    gzip_vary on;
    gzip_disable "MSIE [1-6]\.(?!.*SV1)";

    client_max_body_size 8M;#(配置请求体缓存区大小, 不配的话)
    client_body_buffer_size 128k;#(设置客户端请求体最大值)
    fastcgi_intercept_errors on;

    # 若新增后端路由前缀注意在此处添加(|新增)
        location ~* ^/(code|auth|admin|monitor|gen|job|tx|act|mp|pay|base|help|ih|cons|mall|invoice) {
                proxy_pass http://pigx-gateway:9999;
                proxy_connect_timeout 3600s;
                proxy_send_timeout 3600s;
                proxy_read_timeout 3600s;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Proto http;
        }


    location / {
        root /usr/share/nginx/html/cons/;
        index  index.html index.html;
    }
    location /fpweb {
        alias   /usr/share/nginx/html/invoice-web/;
        index   index.html;
    }

    # 避免端点安全问题
    if ($request_uri ~ "/actuator"){
        return 403;
    }
}
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;

events {
    worker_connections 1024;
}

http {
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    client_max_body_size   300m;
    sendfile            on;
    tcp_nopush          on;
    tcp_nodelay         on;
    keepalive_timeout   65;
    types_hash_max_size 4096;

    include             /etc/nginx/mime.types;
    default_type        application/octet-stream;

    include /etc/nginx/conf.d/*.conf;


}

 

posted on 2024-07-12 17:32  秦瑞It行程实录  阅读(5)  评论(0编辑  收藏  举报
www.cnblogs.com/ruiyqinrui