zoukankan      html  css  js  c++  java
  • nginx 之特殊端口转目录访问

    #user root;
    worker_processes 16;

    error_log /var/log/nginx/error.log;
    #error_log logs/error.log notice;
    #error_log logs/error.log info;

    #pid logs/nginx.pid;


    events {
    worker_connections 102400;
    }


    http {
    include mime.types;
    default_type application/octet-stream;

    log_format main '$remote_addr $http_X_Forwarded_For [$time_local] '
    '$upstream_addr $upstream_response_time "$request_time" '
    '$http_host $request '
    '"$status" $body_bytes_sent "$http_referer" '
    '"$http_accept_language" "$http_user_agent" ';

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

    sendfile on;
    #tcp_nopush on;

    #keepalive_timeout 0;
    keepalive_timeout 65;

    #gzip on;


    upstream api {
    server 127.0.0.1:89;
    }
    upstream record {
    server 127.0.0.1:90;
    }

    set_real_ip_from 0.0.0.0/0;
    real_ip_header X-Forwarded-For;
    server {
    listen 80;
    listen 443 ssl;
    server_name demorecord.nwg999.com;
    ssl_certificate /etc/ssl/STAR.ash521.com.crt;
    ssl_certificate_key /etc/ssl/STAR.ash521.com.key;
    ssl_session_timeout 50m;
    ssl_protocols TLSv1.2;
    ssl_ciphers AESGCM:ALL:!DH:!EXPORT:!RC4:+HIGH:!MEDIUM:!LOW:!aNULL:!eNULL;
    ssl_prefer_server_ciphers on;

    location =/record {
    proxy_pass http://record;
    proxy_connect_timeout 300;
    proxy_headers_hash_max_size 51200;
    proxy_headers_hash_bucket_size 6400;
    proxy_read_timeout 700;
    proxy_send_timeout 700;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $remote_addr;
    }
    }

    server {
    listen 80;
    listen 443 ssl;
    server_name demoapi.ash521.com;
    ssl_certificate /etc/ssl/STAR.nwg999.com.crt;
    ssl_certificate_key /etc/ssl/STAR.ash521.com.key;

    access_log /var/log/nginx/demoapi.ash521.com.log main;

    ssl_session_timeout 50m;
    ssl_protocols TLSv1.2;
    ssl_ciphers AESGCM:ALL:!DH:!EXPORT:!RC4:+HIGH:!MEDIUM:!LOW:!aNULL:!eNULL;
    ssl_prefer_server_ciphers on;

    location ~* /game {
    proxy_pass http://api;
    proxy_connect_timeout 300;
    proxy_headers_hash_max_size 51200;
    proxy_headers_hash_bucket_size 6400;
    proxy_read_timeout 700;
    proxy_send_timeout 700;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $remote_addr;
    }
    }
    }

    魅力男神
  • 相关阅读:
    app移动测试 (自动化遍历方法和技巧)(转载大佬)
    使用Jmeter录制脚本并调试
    整理token,session ,cookies 和正则表达式整理
    ·接口测试核心:URL&HTTP协议详解
    性能测试基本概念 聚合报告指标分析
    数据分析技能点梳理
    数据分析整体知识点架构(转载)
    数据分析职业前景规划
    数据分析三年建议指导(书籍等)
    系统吞吐量(TPS)、用户并发量、性能测试概念和公式 (转载)
  • 原文地址:https://www.cnblogs.com/capable/p/11303341.html
Copyright © 2011-2022 走看看