user  nobody;
worker_processes  1;

error_log  /home/logs/error.log  info;

#pid        logs/nginx.pid;

events {
    worker_connections  1024;
}

http {
    include       /usr/local/nginx-1.15.5/conf/mime.types;
    default_type  application/octet-stream;

    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  logs/access.log  main;
    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;
   client_max_body_size    1024m;

    server {
        listen       10998 ssl;
        server_name  ams.tebon.com.cn;
        #ssl config
        ssl_certificate      /home/conf/tebon2019.pem;
        ssl_certificate_key  /home/conf/tebon2019.key;
        ssl_session_timeout  5m;
        ssl_protocols  TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers  HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM;
        ssl_prefer_server_ciphers   on;
        #charset koi8-r;

        access_log  /home/logs/host.access.log  main;
                root /home/node_dir;
                index index.html;
        location / {
        try_files $uri $uri/ @router;
        index index.html;
        }
        location = /index.html {
           add_header Cache-Control "no-cache, no-store";
        }

        location @router {
        rewrite ^.*$ /index.html last;
        }
    
        #log in
        location ~\/api {
        proxy_pass http://192.168.222.36:8777;
        client_max_body_size    200m;
        proxy_connect_timeout 300s;
        proxy_send_timeout 600s;
         proxy_read_timeout 600s;
        rewrite ^/api/(.*)$ /$1 break;
        }

        #gateway
        location ~ \/(design|monitor|procedure|sys-manage|duration|security-price|suning|investor|self)\/ {
        proxy_pass   https://192.168.3.103:10443;
        client_max_body_size    1024m;
        proxy_connect_timeout 300s;
        proxy_send_timeout 600s;
         proxy_read_timeout 18000s;
        rewrite ^/api/(.*)$ /$1 break;
        }

        #mindoc
        location ~\/min-docs {
                proxy_pass   http://192.168.222.68:8181;
                client_max_body_size    200m;
                proxy_connect_timeout 300s;
                proxy_send_timeout 600s;
                proxy_read_timeout 600s;
                rewrite ^/min-docs/(.*)$ /$1 break;
        }
        #error_page  404              /404.html;

        #error process
        #redirect server error pages to the static page /50x.html
        
        error_page 404 500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ \.php$ {
        #    proxy_pass   http://127.0.0.1;
        #}

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        #location ~ \.php$ {
        #    root           html;
        #    fastcgi_pass   127.0.0.1:9000;
        #    fastcgi_index  index.php;
        #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
        #    include        fastcgi_params;
        #}

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #    deny  all;
        #}
    }

            server {
        listen       10998 ssl;
        server_name  wiki.ams.tebon.com.cn;
        #ssl config
        ssl_certificate      /home/conf/tebon2019.pem;
        ssl_certificate_key  /home/conf/tebon2019.key;
        ssl_session_timeout  5m;
        ssl_protocols  TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers  HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM;
        ssl_prefer_server_ciphers   on;
        #charset koi8-r;

        access_log  /home/logs/host.access.log  main;
                root /home/node_dir;
                index index.html;

        location @router {
        rewrite ^.*$ /index.html last;
        }
    

        location / {
        proxy_pass   http://192.168.222.68:8181;
                client_max_body_size    200m;
        proxy_connect_timeout 300s;
        proxy_send_timeout 600s;
         proxy_read_timeout 600s;
        rewrite ^/api/(.*)$ /$1 break;
        }

        
        error_page 404 500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

       
    }

    # another virtual host using mix of IP-, name-, and port-based configuration
    #
    #server {
    #    listen       8000;
    #    listen       somename:8080;
    #    server_name  somename  alias  another.alias;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}

    # HTTPS server
    #
    #server {
    #    listen       443 ssl;
    #    server_name  localhost;

    #    ssl_certificate      cert.pem;
    #    ssl_certificate_key  cert.key;

    #    ssl_session_cache    shared:SSL:1m;
    #    ssl_session_timeout  5m;

    #    ssl_ciphers  HIGH:!aNULL:!MD5;
    #    ssl_prefer_server_ciphers  on;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}

    server {
        listen       9091;
        server_name  192.168.3.103;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

                root /home/node_dir;
                index index.html;
        location / {
            proxy_pass   https://192.168.3.103:10443;
            client_max_body_size 100M;
            proxy_ignore_client_abort on;
        }
    }
    server {
        listen       9092;
        server_name  192.168.3.103;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

                root /home/node_dir;
                index index.html;
        location / {
            proxy_pass   http://192.168.222.68:8181;
        }
    }

}

nginx103的更多相关文章

  1. HAProxy实战

    实验目的 测试基于haproxy的反代和负载均衡配置 测试keepalived高可用haproxy的效果 实验要点 (1) 动静分离discuzx,动静都要基于负载均衡实现: (2) 进一步测试在ha ...

  2. Docker数据管理与挂载管理

    介绍如何在 Docker 内部以及容器之间管理数据:在容器中管理数据主要有两种方式:数据卷(Volumes).挂载主机目录 (Bind mounts) 镜像来源 [root@docker01 ~]# ...

随机推荐

  1. 以简御繁——介绍IOC

    1.IOC的理论背景 大家开发理念,一直都是奔着架构稳定.低耦合性.而IOC初衷,就是为了解决模块依赖问题,理解<六大设计原则(SOLID)> 如图所示,在我们开发中,业务的实现,就是靠着 ...

  2. 使用pynput同时监听鼠标和键盘

    pynput概述 pynput是一个基于python的,能够监听和控制鼠标和键盘的第三方库. pynput主要包括两个类,pynput.mouse和pynput.keyboard,顾名思义,前者可以用 ...

  3. [opencv]常用阵列操作函数总结

    /*=========================================================================*/ // 阵列操作 /*============ ...

  4. C++异常处理(try catch throw)完全攻略

    程序运行时常会碰到一些异常情况,例如: 做除法的时候除数为 0: 用户输入年龄时输入了一个负数: 用 new 运算符动态分配空间时,空间不够导致无法分配: 访问数组元素时,下标越界:打开文件读取时,文 ...

  5. Android程序设计基础 • 【目录】

    章节 内容 实践练习 Android程序设计基础作业目录 (作业笔记) 第1章 Android程序设计基础 • [第1章 Android程序入门] 第2章 Android程序设计基础 • [第2章 基 ...

  6. JZOJ 3296 Luogu P3296 [SDOI2013]刺客信条

    前言 做法来自:@pzrpzr ,写一下!Orz pzr! 题目大意 \(n\) 个点的无根树,每个点有两个 \(0/1\) 权值,合适地安排节点在同构树中的顺序,使得前后对应的权值不同节点个数最小, ...

  7. 《手把手教你》系列技巧篇(五十四)-java+ selenium自动化测试-上传文件-中篇(详细教程)

    1.简介 在实际工作中,我们进行web自动化的时候,文件上传是很常见的操作,例如上传用户头像,上传身份证信息等.所以宏哥打算按上传文件的分类对其进行一下讲解和分享. 2.为什么selenium没有提供 ...

  8. Selenium_元素定位(2)

    Selenium操作页面上的文本输入框.按钮.单选框.复选框等,凡是能在页面显示的任何元素都需要先对元素进行定位. Selenium提供了以下方法来定位页面中元素: find_element_by_i ...

  9. JMeter_jmeter-plugins插件的安装使用

    一.安装JMter Plugins 1.官网下载 JMeter Plugins 的jar包 2. 将下载的jar包复制到 %JMETER_HOME%\lib\ext 目录下 3. 启动 JMeter ...

  10. Java复制文件用数据流方法,renameTO()方法是相当于剪切操作

    我想达到的效果是,一个文件复制到另一个地方,然后重命名 //判断是否存在 File file = new File("D:/tomcat9.0.12/apache-tomcat-9.0.12 ...