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. 【Java例题】5.4 排序集合的使用

    4.排序集合的使用.使用TreeSet模拟一个一维整数数组.其中,一维整数数组元素由Random类随机产生.最后显示排序后的结果. package chapter6; import java.util ...

  2. uniapp解决测评有组件导出风险,解决APP反编译,回编译后app无法打开的问题

    1.APP反编译 使用hbx云打包,打包出apk 拿到apk后,先下载反编译工具 https://pan.baidu.com/s/1A5D8x_pdSELlHYl-Wl6Xnw 提取码 6vzd 使用 ...

  3. CS5211设计EDP转LVDSA转接屏|替代LT7211|DP转LVDS屏驱动 转接板

    LT7211是一种用于虚拟现实/显示应用的高性能C/DP1.2至LVDS芯片. 对于DP1.2输入,LT7211可以配置为1.2.4车道,还支持车道交换功能.自适应均衡使其适用于长电缆应用,最大带宽可 ...

  4. mybatis练习-获取拥有“普通用户”角色的所有用户信息,要求查询结果除了包含用户自身信息,还包括角色名和角色创建时间。

    实现要求: 获取拥有"普通用户"角色的所有用户信息,要求查询结果除了包含用户自身信息,还包括角色名和角色创建时间. 实现思路: 在用户实体类SysUser中新增角色SysRole成 ...

  5. kubernetes部署第一个应用案例

    对比有无-o wide参数的区别 kubectl get pod --all-namespaceskubectl get pod --all-namespaces -o wide如下,查看所有Pod信 ...

  6. 【】JSON介绍

    0.说明 JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式. 易于人阅读和编写. 同时也易于机器解析和生成. 它是基于JavaScript Programm ...

  7. 【】Elasticsearch客户端API使用Demo

    Elasticsearch客户端API使用Demo, 转载自官方文档, 以索引雇员文档为示例, 在命令行使用curl演示了一系列的Restful API操作. 1.索引雇员文档 第一个业务需求就是存储 ...

  8. linux(CentOS7) 之 zookeeper 下载及安装

    下载 搜索apache ,进入apache官网(https://www.apache.org/)下载 选择downloads 下的distribution 点击archive site 找到zooke ...

  9. Jenkins_创建git任务(3)

    jenkins创建git任务,需要使用插件 点击Manage Jenkins,点击Manage Plugins 点击Available搜索git,安装git plugin 进入项目管理界面,会有个Gi ...

  10. 微信小程序css继承

    在微信小程序里写的全局样式,pages里的组件是可以继承的,但是components里只能继承font和color属性.