nginx.conf 4.03 KB
#user  nobody;
#worker_processes  1;

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

#pid        logs/nginx.pid;

user  www www;

worker_processes 8;
worker_cpu_affinity 00000001 00000010 00000100 00001000 00010000 00100000 01000000 10000000;

pid pid/nginx.pid;
# [ debug | info | notice | warn | error | crit ]
#error_log  /Data/logs/nginx/nginx_error.log info;
error_log  /Data/logs/nginx/nginx_error.log error;
#Specifies the value for maximum file descriptors that can be opened by this process.
worker_rlimit_nofile 51200;


events {
    worker_connections  1024;
}


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

       log_format fenxi '$remote_addr|$http_x_forwarded_for|[$time_local]|$http_host|$request|'
                        '$status|$body_bytes_sent|$request_time|$upstream_response_time|$upstream_cache_status|$http_referer|'
                        '$http_user_agent|$upstream_addr';




    #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  180;
    client_max_body_size 600m;
    
    gzip on;
    gzip_min_length  1k;
    gzip_buffers     4 256k;
    gzip_http_version 1.0;
    gzip_comp_level 2;
    gzip_types       text/plain application/x-javascript text/css application/xml application/json;
    gzip_vary on;

    proxy_buffering    off;
    proxy_buffer_size  256k;  
    proxy_buffers   32 256k;  
    proxy_busy_buffers_size 256k;  

    server {
        listen       80;
        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            root   html;
            index  index.html index.htm;
        }

        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #
        error_page   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;
        #}
    }


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

 upstream yohobuy-portal {
    server 10.66.50.140:30012;
 }

 upstream yohobuy-shops {
    server 10.66.50.140:30016;
 }


 upstream yohobuy-platform {
    server 10.66.50.140:8088;
 }


upstream yohobuy-shop-manage {
    server 10.66.50.140:6007;
 }

upstream wxauth-server {
    server 10.66.80.2:80;
 }

 upstream platform-cms {
    server 10.66.70.193:8099;
 }
include vhost/*.conf;

}