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. RabbitMQ,RocketMQ,Kafka 事务性,消息丢失和消息重复发送的处理策略

    消息队列常见问题处理 分布式事务 什么是分布式事务 常见的分布式事务解决方案 基于 MQ 实现的分布式事务 本地消息表-最终一致性 MQ事务-最终一致性 RocketMQ中如何处理事务 Kafka中如 ...

  2. Reproducing Kernel Hilbert Space (RKHS)

    目录 概 主要内容 RKHS-wiki 概 这里对RKHS做一个简单的整理, 之前的理解错得有点离谱了. 主要内容 首先要说明的是, RKHS也是指一种Hilbert空间, 只是其有特殊的性质. Hi ...

  3. Java Web程序设计笔记 • 【第8章 会话跟踪技术进阶】

    全部章节   >>>> 本章目录 8.1 Session机制 8.1.1 Session 简介 8.1.2 创建 HttpSession 实例 8.1.3 HttpSesiso ...

  4. 【HTML响应式项目】成人教育官网前端页面(HTML+CSS+JS实现三端适应)

    这个页面是在校参赛的小组项目,除首页和所有课程页面以外由组内成员编写,发博客纯属记录. 项目源码已上传至码云仓库:https://gitee.com/ynavc/sss 项目演示地址:http://y ...

  5. JavaScript交互式网页设计 • 【第4章 JavaScript文档对象模型】

    全部章节   >>>> 本章目录 4.1 文档对象模型简介及属性 4.1.1 文档对象模型概述 4.1.3 实践练习 4.2 document 对象查找 HTML 元素 4.2 ...

  6. Hbase单点安装Version1.1.5

    Hbase单点安装,基于版本1.1.5, 使用hbase-1.1.5.tar.gz安装包. 1.安装说明 使用Hbase自带zookeeper和本地文件目录存储数据 2.安装规划 角色规划 IP/机器 ...

  7. shell2-if判断2

    1.条件判断if 判断条件:then //单分支语句 命令1 命令2fi 例子: #!/bin/bash ls if [ $? -eq 0 ]; then echo "执行成功了" ...

  8. IntelliJ IDEA 2020.1.1 x64 Debug 断点调试模式详解

    前言 对于初入职场的萌新们来说,很多都还不会 Debug 断点模式.记得我刚写代码的时候,也是通过 System.out.println() 一行一行的把变量打印出来看.其实强大的编辑器已经帮我们做好 ...

  9. .NetCore下构建自己的服务配置中心-手动造轮子

    本人主要利用IdentityServer4以及SignalR来实现,IdentityServer4作为认证,SignalR来交互配置,这里一些代码可能就是部分提出来,主要介绍实现原理及方法 实现配置中 ...

  10. Nagios 请检查HTTP服务器关于该CGI的访问权限设置

    无权查看任何主机的信息. 请检查HTTP服务器关于该CGI的访问权限设置. 搜索了一下方法 确保 htpasswd.user的所有组为nagios 解决办法: vi /usr/local/nagios ...