zoukankan      html  css  js  c++  java
  • nginx 配置

    user mindx;
    worker_processes 2;

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

    #pid logs/nginx.pid;


    events {
    worker_connections 1024;
    }


    http {
    include mime.types;
    default_type application/octet-stream;
    proxy_buffering off;
    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;

    #app接口分发配置
    upstream interface{
    server 10.128.31.175:8888 weight=1;
    }

    #app管理平台分发配置
    upstream website{
    server 10.128.31.175:8890 weight=1;
    }

    #tv
    upstream tv{
    #server 10.128.31.175:8081 weight=1;
    server 10.128.31.175:9999 weight=1;
    }

    upstream meiguo_zt_shop_upstream {
    server 127.0.0.1:56789;
    }

    server {
    listen 8993;
    server_name localhost;
    location / {
    proxy_connect_timeout 3;
    proxy_send_timeout 30;
    proxy_read_timeout 30;
    proxy_set_header X-real-ip $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    include cros.conf;
    proxy_pass http://interface;
    }

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

    }


    server {
    listen 8993;
    server_name supperapptest.meiguosmart.com;
    location / {
    proxy_connect_timeout 3;
    proxy_send_timeout 30;
    proxy_read_timeout 30;
    proxy_set_header X-real-ip $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    include cros.conf;
    proxy_pass http://interface;
    }

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

    }

    server {
    listen 80;
    server_name localhost;
    location / {
    proxy_connect_timeout 3;
    proxy_send_timeout 30;
    proxy_read_timeout 30;
    proxy_pass http://website;
    }

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

    }

    server {
    listen 80;
    server_name supperapptest.meiguosmart.com;
    location / {
    proxy_connect_timeout 3;
    proxy_send_timeout 30;
    proxy_read_timeout 30;
    proxy_pass http://website;
    }

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

    }


    server {
    listen 8081;
    server_name localhost;
    location / {
    proxy_connect_timeout 3;
    proxy_send_timeout 30;
    proxy_read_timeout 30;
    proxy_set_header X-real-ip $remote_addr;
    proxy_pass http://tv;
    client_max_body_size 1000m;
    }

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

    }

    server {
    listen 9080;
    server_name supperapptest.meiguosmart.com;
    charset utf-8;
    ssl on;
    ssl_certificate server.pem;
    ssl_certificate_key server.key;
    ssl_session_timeout 5m;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;
    location /api/ {
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_set_header X-NginX-Proxy true;
    proxy_set_header Connection "";
    proxy_http_version 1.1;
    proxy_pass http://meiguo_zt_shop_upstream/;
    }
    location /admin {
    alias /home/mindx/mindxsoft/servers/jifen/admin/;
    index index.html index.htm;
    }
    location /point {
    alias /home/mindx/mindxsoft/servers/jifen/point/;
    index index.html index.htm;
    }
    location / {
    alias /home/mindx/mindxsoft/servers/jifen/mobile/;
    index index.html index.htm;
    }
    }


    server {
    listen 8445;
    server_name localhost;
    ssl on;
    ssl_certificate server.pem;
    ssl_certificate_key server.key;
    ssl_session_timeout 5m;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;
    location / {
    #limit_conn_zone one 1;
    limit_rate 300k;
    proxy_connect_timeout 3;
    proxy_send_timeout 30;
    proxy_read_timeout 30;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    include cros.conf;
    proxy_pass http://interface;
    }
    location /content {
    root /home/mindx/webapps/;
    rewrite ^(.*)$ $1.html break;
    }

    location /photo {
    root /home/mindx/webapps;
    }

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


    server {
    listen 8445;
    server_name supperapptest.meiguosmart.com;
    ssl on;
    ssl_certificate server.pem;
    ssl_certificate_key server.key;
    ssl_session_timeout 5m;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;
    location / {
    #limit_conn_zone one 1;
    limit_rate 300k;
    proxy_connect_timeout 3;
    proxy_send_timeout 30;
    proxy_read_timeout 30;
    include cros.conf;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_pass http://interface;
    }
    location /content {
    root /home/mindx/webapps/;
    rewrite ^(.*)$ $1.html break;
    }
    location /photo {
    root /home/mindx/webapps/;
    }
    location /h5 {
    root /home/mindx/webapps/;

    }
    #location /html {
    # root /home/mindx/webapps/banner;
    # rewrite ^(.*)$ $1.jpg break;
    #}

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

    #server {
    # listen 443;
    # server_name supperapptest.meiguosmart.com;
    # ssl on;
    # ssl_certificate server.pem;
    # ssl_certificate_key server.key;
    # ssl_session_timeout 5m;
    # ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    # ssl_prefer_server_ciphers on;
    # location / {
    # proxy_connect_timeout 3;
    # proxy_send_timeout 30;
    # proxy_read_timeout 30;
    # include cros.conf;
    # proxy_set_header X-Real-IP $remote_addr;
    # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    # proxy_set_header Host $http_host;
    # proxy_pass http://interface;
    # }
    #
    # error_page 500 502 503 504 /50x.html;
    # location = /50x.html {
    # root html;
    # }
    #}


    server {
    listen 8995;
    server_name supperapptest.meiguosmart.com;
    #ssl on;
    #ssl_certificate server.pem;
    #ssl_certificate_key server.key;
    #ssl_session_timeout 5m;
    #ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    #ssl_prefer_server_ciphers on;
    location / {
    proxy_connect_timeout 3;
    proxy_send_timeout 30;
    proxy_read_timeout 30;
    include cros.conf;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_pass http://interface;
    }

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

    server {
    listen 8995;
    server_name localhost;
    #ssl on;
    #ssl_certificate server.pem;
    #ssl_certificate_key server.key;
    #ssl_session_timeout 5m;
    #ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    #ssl_prefer_server_ciphers on;
    location / {
    proxy_connect_timeout 3;
    proxy_send_timeout 30;
    proxy_read_timeout 30;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    include cros.conf;
    proxy_pass http://interface;
    }

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

    }

    life is a jounery,yes
  • 相关阅读:
    解决The markup in the document following the root element must be well-formed.
    全排列算法:递归和非递归实现
    利用异或运算实现交换2个数据
    dojo 代码调试
    dogo 官方翻译 Ajax with dojo/request
    dojo 官方翻译 dojo/Deferred
    dojo 官方翻译 dojo/aspect
    get app id
    [转]解决eclipse无法设置NDK问题
    关于二级指针
  • 原文地址:https://www.cnblogs.com/CaptainLin/p/7216232.html
Copyright © 2011-2022 走看看