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;
        }
    }

}

最新文章

  1. 【Python实战】Pandas:让你像写SQL一样做数据分析(一)
  2. vim使用技巧
  3. 在eclipse的maven插件中搜寻本地仓库中的jar搜索不到的解决方案
  4. target和currentTarget的区别
  5. Orchard Application Host
  6. poj-1611-The Suspects
  7. iOS随机生成数字
  8. Multi-catch
  9. 大数据平台搭建(hadoop+spark)
  10. Android动态加载技术初探
  11. linux 启动network后报错:device eth0 does not seem to be present, delaying initialization
  12. mysql 主从复制配置步骤
  13. Git 添加空文件夹的方法
  14. LNMP 基于域名的虚拟主机配置 (Centos5.6)
  15. gridView自己定义做时间排版
  16. 理解委托(delegate)及为什么要使用委托
  17. 使用webpack打包css和js
  18. PHP htmlspecialchars和htmlspecialchars_decode(函数)
  19. Ubuntu软件安装与卸载
  20. SKlearn库学习曲线

热门文章

  1. Globally-Robust Neural Networks
  2. 利用数学软件Mathematica的三维图像进行建模
  3. win下如何优雅的使用 Burp Suite最新版
  4. HTML多端适应 响应式布局案例
  5. 编写Java程序,使用 dom4j 创建一个 XML 文档,文档名为“city.xml”。注意该文档的格式和数据
  6. 你还不了解SpringSecurity吗?快来看看SpringSecurity实战总结~
  7. 禁止yum update 自动更新系统内核
  8. JDBC 处理sql查询多个不确定参数
  9. GORM学习指南
  10. 战争游戏(War Games 1983)剧情