cwan Nginx 配置

194

#user nobody;
worker_processes 8;

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

#pid logs/nginx.pid;

events {
    use epoll;
    worker_connections 51200;
}

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

    log_format main    ‘$remote_addr - $remote_user [$time_local] "$host $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;
    tcp_nodelay on;

    keepalive_timeout 5;

    gzip on;
    gzip_proxied any;
    gzip_types text/xml text/css application/x-javascript;
    gzip_comp_level 5;
    gzip_http_version 1.0;

    #proxy_temp_path /tmp/nginx/temp;
    #proxy_cache_path /tmp/nginx/cache levels=2:2 keys_zone=static:1024m inactive=30d max_size=16384m;
    #proxy_ignore_client_abort on;

    upstream idirector {
        server 10.10.1.1:8081;
        fair;
    }

    server {
        listen 113.31.18.194:80 default_server;
        server_name _;
        return 404;
    }

    server {
        listen 113.31.18.194:80;
        server_name webgame.cwan.com backend.cgirls.cn mobile.cwan.com cgirls.cwan.com chanye.cwan.com ugc.cwan.com api.cwan.com mcp.cwan.com biz.cwan.com xyx.cwan.com;

        #rewrite ^/([^.]+[^/])$ /$1/ permanent;

        location / {
            #allow 42.62.4.140;
            #allow 180.166.98.98;
            #deny all;

            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

            client_max_body_size 10M;
            client_body_buffer_size 512k;

            proxy_buffering off;
            proxy_connect_timeout 1800;
            proxy_send_timeout 1800;
            proxy_read_timeout 1800;
        }
    }
} 

195

#user nobody;
worker_processes 8;

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

#pid logs/nginx.pid;

events {
    use epoll;
    worker_connections 51200;
}

http {
    server_names_hash_max_size 1024;
     server_names_hash_bucket_size 64;
    include mime.types;
    default_type application/octet-stream;

    log_format main    ‘$remote_addr - $remote_user [$time_local] "$host $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;
    tcp_nodelay on;

    keepalive_timeout 5;

    gzip on;
    gzip_proxied any;
    gzip_types text/xml text/css application/x-javascript;
    gzip_comp_level 5;
    gzip_http_version 1.0;

    proxy_temp_path /mnt/ext/nginx_tmp/temp;
    proxy_cache_path /mnt/ext/nginx_tmp/cache levels=1:2 keys_zone=static:256m inactive=24h max_size=4096m;

    upstream idirector {
        server 10.10.1.2:8081;
        fair;
    }

    server {
        listen 113.31.18.195:80 default_server;
        server_name _;
        return 404;
    }

    server {
        listen 113.31.18.195:80;
        server_name dpcq.bbs.youxiduo.com cqzj.bbs.youxiduo.com;

        location / {
            #limit_req zone=bbs burst=10;
            #allow 180.166.98.98;
            #deny all;
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
        }
    }

    server {
        listen 113.31.18.195:80;
        server_name 113.31.18.195 www.imbagame.com center.cwan.com;

        if ($host ~ "113.31.18.195") {
            rewrite ^ http://www.youxiduo.com/? permanent;
        }

        rewrite ^/([^.]+[^/])$ /$1/ permanent;

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 10M;
            client_body_buffer_size 512k;
            proxy_connect_timeout 1800;
            proxy_send_timeout 1800;
            proxy_read_timeout 1800;
            proxy_buffering off;
        }
    }

    server {
        listen 113.31.18.195:80;
        server_name old.cwan.com chanye2.cwan.com;

        rewrite ^/([^.]+[^/])$ /$1/ permanent;

        location ~ \.(css|js|ico|jpg|png|gif|swf)$ {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 10M;
            client_body_buffer_size 512k;
            proxy_connect_timeout 1800;
            proxy_send_timeout 1800;
            proxy_read_timeout 1800;
            proxy_buffering off;
        }

        location ~ ^/client.php$ {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 10M;
            client_body_buffer_size 512k;
            proxy_connect_timeout 1800;
            proxy_send_timeout 1800;
            proxy_read_timeout 1800;
            proxy_buffering off;
        }

        location / {
            allow 115.204.108.31;
            allow 113.31.18.198;
            allow 180.166.98.98;
            allow 180.152.237.116;
        allow 218.82.108.240;
            deny all;

            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 10M;
            client_body_buffer_size 512k;
            proxy_connect_timeout 1800;
            proxy_send_timeout 1800;
            proxy_read_timeout 1800;
            proxy_buffering off;
        }
    }

    server {
        listen 113.31.18.195:80;
        server_name www.cwan.com;

        rewrite ^/([^.]+[^/])$ /$1/ permanent;

        location / {
            deny all;

            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 10M;
            client_body_buffer_size 512k;
            proxy_connect_timeout 1800;
            proxy_send_timeout 1800;
            proxy_read_timeout 1800;
            proxy_buffering off;
        }
    }

    server {
        listen 113.31.18.195:80;
        server_name fkcg.youxiduo.com dzm.youxiduo.com pvz2.youxiduo.com act.youxiduo.com  ybtx.youxiduo.com chukong.youxiduo.com  cpi.youxiduo.com;

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
        }
    }

    server {
        listen 113.31.18.195:80;
        server_name mcp.youxiduo.com;

        location / {
            allow 180.166.98.98;
            deny all;
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
        }
    }

    server {
        listen 113.31.18.195:80;
        server_name chanye.cwan.com;

        location / {
            #allow 180.166.98.98;
            #deny all;
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
        }
    }

    server {
        listen 113.31.18.195:80;
        server_name pms.youxiduo.com;

        location / {
            #allow 180.166.98.98;
            #deny all;
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
        }
    }

    server {
        listen 113.31.18.195:80;
        server_name yzr.youxiduo.com;

        if ($http_user_agent !~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://www.youxiduo.com/game/60761/? permanent;
        }

        location / {
            #allow 180.166.98.98;
            #deny all;
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
        }
    }

    limit_req_zone $binary_remote_addr zone=bbs:10m rate=5r/s;

    server {
        listen 113.31.18.195:80;
        server_name bbs.youxiduo.com;
        rewrite ^ http://www.youxiduo.com permanent;

        location / {
            limit_req zone=bbs burst=10;
            #allow 180.166.98.98;
            #deny all;
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
        }
    }    

    server {
        listen 113.31.18.195:80;
        server_name ma.youxiduo.com;

        if ($http_user_agent ~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://ma.youxiduo.com/mobile/? permanent;
            rewrite ^.*/(\d+).shtml$ http://ma.youxiduo.com/mobile/?$1? permanent;
        }

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }
    }

    server {
        listen 113.31.18.195:80;
        server_name myx.youxiduo.com;

        location / {
            #allow 180.166.98.98;
            #deny all;
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
        }
    }

    server {
        listen 113.31.18.195:80;
        server_name mkhx.youxiduo.com;

        if ($http_user_agent ~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://mkhx.youxiduo.com/mobile/? permanent;
            rewrite ^.*/(\d+).shtml$ http://mkhx.youxiduo.com/mobile/?$1? permanent;
        }

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }
    }

    server {
        listen 113.31.18.195:80;
        server_name jw2.youxiduo.com;

        if ($http_user_agent ~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://jw2.youxiduo.com/mobile/? permanent;
            rewrite ^.*/(\d+).shtml$ http://jw2.youxiduo.com/mobile/?$1? permanent;
        }

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }
    }

    server {
        listen 113.31.18.195:80;
        server_name dnxy.youxiduo.com;

        if ($http_user_agent ~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://dnxy.youxiduo.com/mobile/? permanent;
            rewrite ^.*/(\d+).shtml$ http://dnxy.youxiduo.com/mobile/?$1? permanent;
        }

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }
    }

    server {
        listen 113.31.18.195:80;
        server_name cqzj.youxiduo.com;

        if ($http_user_agent ~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://cqzj.youxiduo.com/mobile/? permanent;
            rewrite ^.*/(\d+).shtml$ http://cqzj.youxiduo.com/mobile/?$1? permanent;
        }

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }
    }

    server {
        listen 113.31.18.195:80;
        server_name wlbl.youxiduo.com;

        if ($http_user_agent ~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://wlbl.youxiduo.com/mobile/? permanent;
            rewrite ^.*/(\d+).shtml$ http://wlbl.youxiduo.com/mobile/?$1? permanent;
        }

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }
    }

    server {
        listen 113.31.18.195:80;
        server_name ttkp.youxiduo.com;

        if ($http_user_agent ~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://ttkp.youxiduo.com/mobile/? permanent;
            rewrite ^.*/(\d+).shtml$ http://ttkp.youxiduo.com/mobile/?$1? permanent;
        }

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }
    }

    server {
        listen 113.31.18.195:80;
        server_name ttfc.youxiduo.com;

        if ($http_user_agent ~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://ttfc.youxiduo.com/mobile/? permanent;
        }        

        if ($http_user_agent !~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://www.youxiduo.com/game/49783 permanent;
        }

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }
    }

    server {
        listen 113.31.18.195:80;
        server_name qmyx.youxiduo.com;

        if ($http_user_agent ~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://qmyx.youxiduo.com/mobile/? permanent;
            rewrite ^.*/(\d+).shtml$ http://qmyx.youxiduo.com/mobile/?$1? permanent;
        }

        if ($http_user_agent !~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://www.youxiduo.com/game/37988 permanent;
        }

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }
    }

    server {
        listen 113.31.18.195:80;
        server_name tlbb.youxiduo.com;
        rewrite ^/$ http://www.youxiduo.com/game/49718/? permanent;

   }

   server {
        listen 113.31.18.195:80;
        server_name lwsg.youxiduo.com;
        #rewrite ^/$ http://www.youxiduo.com/game/53192/? permanent;

        if ($http_user_agent ~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://lwsg.youxiduo.com/mobile/? permanent;
        }

        if ($http_user_agent !~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://www.youxiduo.com/game/53192 permanent;
        }

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }

   }

   server {
        listen 113.31.18.195:80;
        server_name fknsg.youxiduo.com;
        rewrite ^/$ http://www.youxiduo.com/game/57980/? permanent;

   }

   server {
        listen 113.31.18.195:80;
        server_name dtcq.youxiduo.com;

        if ($http_user_agent !~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://www.youxiduo.com/game/56290 permanent;
        }

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }

   }

  server {
        listen 113.31.18.195:80;
        server_name ltzj.youxiduo.com;
        rewrite ^/$ http://www.youxiduo.com/game/65230 permanent;
        if ($http_user_agent !~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://www.youxiduo.com/game/56290 permanent;
        }

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }

   }

   server {
        listen 113.31.18.195:80;
        server_name shenmo.youxiduo.com;

        if ($http_user_agent !~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://www.youxiduo.com/game/4615 permanent;
        }

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }

   }

   server {
        listen 113.31.18.195:80;
        server_name szr.youxiduo.com;

        if ($http_user_agent !~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            #rewrite ^/$ http://www.youxiduo.com/game/4615 permanent;
        }

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }

   }

   server {
        listen 113.31.18.195:80;
        server_name dark.youxiduo.com;
        if ($http_user_agent ~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://dark.youxiduo.com/mobile/? permanent;
        }

       if ($http_user_agent !~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://www.youxiduo.com/game/51503 permanent;
        }

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }

   }

   server {
        listen 113.31.18.195:80;
        server_name sghx.youxiduo.com;
        if ($http_user_agent ~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://sghx.youxiduo.com/mobile/? permanent;
        }

       if ($http_user_agent !~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://www.youxiduo.com/game/48644 permanent;
        }

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }

   }

   server {
        listen 113.31.18.195:80;
        server_name blswz.youxiduo.com;
        if ($http_user_agent ~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://blswz.youxiduo.com/mobile/? permanent;
        }

        if ($http_user_agent !~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://www.youxiduo.com/game/47680 permanent;
        }

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }

   }

   server {
        listen 113.31.18.195:80;
        server_name ggsg.youxiduo.com;
        if ($http_user_agent ~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://ggsg.youxiduo.com/mobile/? permanent;
        }

        if ($http_user_agent !~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://www.youxiduo.com/game/52794 permanent;
        }

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }

   }

   server {
        listen 113.31.18.195:80;
        server_name bwlb2.youxiduo.com;
        rewrite ^/$ http://www.youxiduo.com/game/52397/? permanent;

   }

   server {
        listen 113.31.18.195:80;
        server_name lolheroes.youxiduo.com;
        #rewrite ^/$ http://www.youxiduo.com/game/57643/? permanent;
        if ($http_user_agent ~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://lolheroes.youxiduo.com/mobile/? permanent;
        }

        if ($http_user_agent !~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://www.youxiduo.com/game/57643 permanent;
        }

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }

   }

   server {
        listen 113.31.18.195:80;
        server_name ppsg.youxiduo.com;
        if ($http_user_agent ~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://ppsg.youxiduo.com/mobile/? permanent;
        }

        if ($http_user_agent !~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://www.youxiduo.com/game/51323 permanent;
        }

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }
        #rewrite ^/$ http://www.youxiduo.com/game/51323/? permanent;

   }

   server {
        listen 113.31.18.195:80;
        server_name wlcs.youxiduo.com;
        rewrite ^/$ http://www.youxiduo.com/game/49800/? permanent;

   }

   server {
        listen 113.31.18.195:80;
        server_name ls.youxiduo.com;
        rewrite ^/$ http://www.youxiduo.com/game/59780/? permanent;

   }

   server {
        listen 113.31.18.195:80;
        server_name qy2.youxiduo.com;
        rewrite ^/$ http://www.youxiduo.com/game/53175/? permanent;

   }

   server {
        listen 113.31.18.195:80;
        server_name xyxmp.youxiduo.com;
        rewrite ^/$ http://www.youxiduo.com/game/53195/? permanent;

   }

   server {
        listen 113.31.18.195:80;
        server_name hh.youxiduo.com;
        rewrite ^/$ http://www.youxiduo.com/game/43122/? permanent;

   }

   server {
        listen 113.31.18.195:80;
        server_name ntxml.youxiduo.com;
        rewrite ^/$ http://www.youxiduo.com/game/39609/? permanent;

   }

   server {
        listen 113.31.18.195:80;
        server_name jfyzz.youxiduo.com;
        rewrite ^/$ http://www.youxiduo.com/game/57209/? permanent;

   }

   server {
        listen 113.31.18.195:80;
        server_name sjh.youxiduo.com;
        rewrite ^/$ http://www.youxiduo.com/game/53728/? permanent;

   }

   server {
        listen 113.31.18.195:80;
        server_name gc.youxiduo.com;
        rewrite ^/$ http://www.youxiduo.com/game/52098/? permanent;

   }

   server {
        listen 113.31.18.195:80;
        server_name jyj.youxiduo.com;

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }

   }

   server {
        listen 113.31.18.195:80;
        server_name bzwx.youxiduo.com;
        #rewrite ^/$ http://www.youxiduo.com/game/58898 permanent;
        if ($http_user_agent !~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://www.youxiduo.com/game/58898 permanent;
        }

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }

   }

   server {
        listen 113.31.18.195:80;
        server_name gmgc.youxiduo.com;

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }

   }

   server {
        listen 113.31.18.195:80;
        server_name zstb.youxiduo.com;

        if ($http_user_agent ~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://zstb.youxiduo.com/mobile/? permanent;
        }

        if ($http_user_agent !~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://www.youxiduo.com/game/52117 permanent;
        }

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }

   }

   server {
        listen 113.31.18.195:80;
        server_name nbamzd.youxiduo.com;

        if ($http_user_agent ~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://nbamzd.youxiduo.com/mobile/? permanent;
        }

        if ($http_user_agent !~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://www.youxiduo.com/game/53448 permanent;
        }

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }

   }
   server {
        listen 113.31.18.195:80;
        server_name download.youxiduo.com;

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }

   }

   server {
        listen 113.31.18.195:80;
        server_name ttxd.youxiduo.com;
    rewrite ^/$ http://www.youxiduo.com/game/65089/? permanent;
   }

   server {
        listen 113.31.18.195:80;
        server_name cblw.youxiduo.com;
        rewrite ^/$ http://www.youxiduo.com/game/66469/? permanent;
   }

   #server {
#    listen 113.31.18.195:80;
#        server_name ttamx.youxiduo.com;
#        rewrite ^/$ http://www.youxiduo.com/game/69570/? permanent;
#
#  }
  # server {
  #      listen 113.31.18.195:80;
  #      server_name csgis.youxiduo.com;
  #      rewrite ^/$ http://csgis.youxiduo.com/mobile/? permanent;
  #    rewrite ^.*/(\d+).shtml$ http://csgis.youxiduo.com/mobile/?$1? permanent;
  # }

 server {
        listen 113.31.18.195:80;
        server_name ttamx.youxiduo.com;

        if ($http_user_agent ~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://ttamx.youxiduo.com/mobile/? permanent;
        }

        if ($http_user_agent !~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://www.youxiduo.com/game/69570 permanent;
        }

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }

   }

 server {
        listen 113.31.18.195:80;
        server_name csgis.youxiduo.com;

        if ($http_user_agent ~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://csgis.youxiduo.com/mobile/? permanent;
            rewrite ^.*/(\d+).shtml$ http://csgis.youxiduo.com/mobile/?$1? permanent;
        }               

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }
    }       

server {
        listen 113.31.18.195:80;
        server_name worldcup.youxiduo.com;

        if ($http_user_agent ~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://worldcup.youxiduo.com/mobile/? permanent;
            rewrite ^.*/(\d+).shtml$ http://worldcup.youxiduo.com/mobile/?$1? permanent;
        }

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }
    }

server {
        listen 113.31.18.195:80;
        server_name hjqst.youxiduo.com;

        if ($http_user_agent ~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://hjqst.youxiduo.com/mobile/? permanent;
        }

        if ($http_user_agent !~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://www.youxiduo.com/game/70519 permanent;
        }

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }

     }

server {
        listen 113.31.18.195:80;
        server_name cc.youxiduo.com;

        if ($http_user_agent ~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
        rewrite ^/$ http://cc.youxiduo.com/mobile/? permanent;
        }

        if ($http_user_agent !~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://www.youxiduo.com/game/65701 permanent;
        }

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }

    }

server {
        listen 113.31.18.195:80;
        server_name jfyr.youxiduo.com;

        if ($http_user_agent ~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://jfyr.youxiduo.com/mobile/? permanent;
            rewrite ^.*/(\d+).shtml$ http://jfyr.youxiduo.com/mobile/?$1? permanent;
        }

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }
    }
server {
        listen 113.31.18.195:80;
        server_name gf.youxiduo.com;

        if ($http_user_agent ~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
                rewrite ^/$ http://m.youxiduo.com/game/19377 permanent;
        }

        if ($http_user_agent !~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
            rewrite ^/$ http://www.youxiduo.com/game/71187  permanent;
        }

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }

    }

   server {
        listen 113.31.18.195:80;
        server_name ios.youxiduo.com;

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
        }
    }            

server {
        listen 113.31.18.195:80;
        server_name smdl.youxiduo.com;

        if ($http_user_agent ~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
                 rewrite ^/$ http://smdl.youxiduo.com/mobile/? permanent;
        #rewrite ^/$ http://m.youxiduo.com/game/14094 permanent;
        }   

        if ($http_user_agent !~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
                rewrite ^/zt/$ http://www.youxiduo.com/zt/53180 permanent;
         rewrite ^/$ http://www.youxiduo.com/game/53180  permanent;
        }   

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }   

    }   

server {
        listen 113.31.18.195:80;
        server_name skyr.youxiduo.com;
        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
        }
    }

server {
        listen 113.31.18.195:80;
        server_name hzal.youxiduo.com;
        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
        }
    } 

server {
        listen 113.31.18.195:80;
        server_name msg.youxiduo.com;

        if ($http_user_agent ~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
                rewrite ^/$ http://msg.youxiduo.com/mobile/? permanent;
        #rewrite ^/$ http://m.youxiduo.com/game/15991 permanent;
        }

        if ($http_user_agent !~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
                 rewrite ^/$ http://www.youxiduo.com/game/58641 permanent;
        }   

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }

    }
server {
        listen 113.31.18.195:80;
        server_name qtds.youxiduo.com;

        if ($http_user_agent ~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
                rewrite ^/$ http://m.youxiduo.com/game/18069 permanent;
        }

        if ($http_user_agent !~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericsson)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|(Windows CE)|(Opera)") {
                 rewrite ^/$ http://www.youxiduo.com/game/65348 permanent;
        }   

        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
            proxy_ignore_client_abort on;
        }       

    }

} 


196

#user nobody;
worker_processes 8;

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

#pid logs/nginx.pid;

events {
        use epoll;
        worker_connections 51200;
}

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

        log_format main ‘$remote_addr - $remote_user [$time_local] "$host $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;
        tcp_nodelay on;

        keepalive_timeout 5;

        gzip on;
        gzip_proxied any;
        gzip_types text/xml text/css application/x-javascript;
        gzip_comp_level 5;
        gzip_http_version 1.0;

        proxy_temp_path /mnt/ext/nginx_tmp/temp;
        proxy_cache_path /mnt/ext/nginx_tmp/cache levels=2:2 keys_zone=static:1024m inactive=30d max_size=16384m;
    proxy_ignore_client_abort on;

    limit_rate_after 500k;
    limit_rate 100k;
    limit_req_zone $binary_remote_addr zone=one:50m rate=20r/s;

    large_client_header_buffers 4 32k;

        server {
                listen 0.0.0.0:80 default_server;
                server_name _;
                return 404;
        }

    server {
        listen 0.0.0.0:80;
        server_name cgirls.cwan.ku6.com;

        rewrite ^/$ http://www.cwan.com/zt/cgirlsku6/? permanent;
    }

        server {
                listen 0.0.0.0:80;
                server_name cwebgame.com *.cwebgame.com;

                if ($host = "cwebgame.com") {
                        rewrite ^ http://www.cwan.com$request_uri? permanent;
                }

                if ($host ~ (\w+)\.cwebgame.com) {
            set $domain $1;
                        rewrite ^ http://$domain.cwan.com$request_uri? permanent;
                }
        }

        server {
                listen 0.0.0.0:80;
                server_name cwan.cn *.cwan.cn;

                if ($host = "cwan.cn") {
                        rewrite ^ http://www.cwan.com$request_uri? permanent;
                }

                if ($host ~ (\w+)\.cwan.cn) {
                        set $domain $1;
                        rewrite ^ http://$domain.cwan.com$request_uri? permanent;
                }
        }

        server {
                listen 0.0.0.0:80;
                server_name img1.cwan.com img2.cwan.com img3.cwan.com img4.cwan.com;

                rewrite ^/([^.]+[^/])$ http://www.cwan.com/? permanent;

                location ~* \.(?!css|js|txt|ico|jpg|png|gif|swf|apk)([^.]*)$ {
                        deny all;
                }

                location /www/ {
                        alias /mnt/www/cwebgame/;
                        expires 24h;
                }

                location /chanye/ {
                        alias /mnt/www/cwan_biz/;
                        expires 24h;
                }

                location /flash/ {
                        alias /mnt/ext/cwan_flash/;
                        expires 24h;
                }

                location /manhua/ {
                        alias /mnt/ext/cwan_manhua/;
                        expires 24h;
                }

        }

        upstream idirector {
                server 10.10.1.3:8081 max_fails=3 fail_timeout=60s;
                server 10.10.1.4:8081 max_fails=3 fail_timeout=60s;
                fair;
        }

        server {
                listen 0.0.0.0:80;
                server_name bbs.cwan.com;

                rewrite ^/([^.]+[^/])$ /$1/ permanent;

                location ~ /purge(/.*) {
                        proxy_cache_purge static $host$1;
                }

                location ~ \.(ico|jpg|png|gif|swf)$ {
                        proxy_pass http://idirector;
                        proxy_set_header Host $host;

                        client_max_body_size 1M;
                        client_body_buffer_size 512k;

                        proxy_buffering on;
                        proxy_connect_timeout 5;
                        proxy_send_timeout 60;
                        proxy_read_timeout 60;

                        add_header Nginx-Cache "$upstream_cache_status";
                        expires 10m;

                        proxy_cache static;
                        proxy_ignore_headers Cache-Control;
                        proxy_ignore_headers Expires;
                        proxy_ignore_headers Set-Cookie;
                        proxy_cache_valid 200 1h;
                        proxy_cache_key "$host$uri";
                }

                location / {
            limit_req zone=one burst=100 nodelay;

                        proxy_pass http://idirector;
                        proxy_set_header Host $host;
                        proxy_set_header X-Real-IP $remote_addr;
                        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

                        client_max_body_size 1M;
                        client_body_buffer_size 512k;

                        proxy_buffering off;
                        proxy_connect_timeout 5;
                        proxy_send_timeout 60;
                        proxy_read_timeout 60;
                }
        }

        server {
                listen 0.0.0.0:80;
                server_name www.cwan.com news.cwan.com xin.cwan.com;

                rewrite ^/([^.]+[^/])$ /$1/ permanent;

                location ~ /purge(/.*) {
                        proxy_cache_purge static $host$1;
                }

                location ~ (client.php|sso.php|vdimgck.php|login_state.php|ajax_feedback.ph
p|feedback_ajax.php|feedback.php|zq_vote.php|cwdq.php|/include/dedeajax2.js|feedback_tj_aja
x.php) {
                        proxy_pass http://10.10.1.2:8081;
                        proxy_set_header Host $host;
                        proxy_set_header X-Real-IP $remote_addr;
                        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

                        client_max_body_size 1M;
                        client_body_buffer_size 512k;

                        proxy_buffering off;
                        proxy_connect_timeout 5;
                        proxy_send_timeout 60;
                        proxy_read_timeout 60;
                }

                location ~ /(app|about|qqzl|zt|mt|ma|sgs|xxj|sxd|sq|blswz|ssqc|hysj|ktpd|rx
hzw|xxia|sscq|app|roco|51seer|mezy|aobi|zlsg|act|mkhx|dzm|jdsj|rlong|xmhzc|clxxz|qq_app|jw2
|mood)/ {
                        proxy_pass http://10.10.1.2:8081;
                        proxy_set_header Host $host;
                        proxy_set_header X-Real-IP $remote_addr;
                        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

                        client_max_body_size 1M;
                        client_body_buffer_size 512k;

            add_header Cache-Control no-transform;

                        proxy_buffering off;
                        proxy_connect_timeout 5;
                        proxy_send_timeout 60;
                        proxy_read_timeout 60;
                }

                location ~ \.(css|js|ico|jpg|png|gif|swf)$ {
                        proxy_pass http://idirector;
                        proxy_set_header Host $host;

                        client_max_body_size 1M;
                        client_body_buffer_size 512k;

                        proxy_buffering on;
                        proxy_connect_timeout 5;
                        proxy_send_timeout 60;
                        proxy_read_timeout 60;

                        add_header Nginx-Cache "$upstream_cache_status";
                        expires 10m;

                        proxy_cache static;
                        proxy_ignore_headers Cache-Control;
                        proxy_ignore_headers Expires;
                        proxy_ignore_headers Set-Cookie;
                        proxy_cache_valid 200 1h;
                        proxy_cache_key "$host$uri";
                }

                location ~ \.(shtml|html|xml)$ {
                        proxy_pass http://idirector;
                        proxy_set_header Host $host;

                        client_max_body_size 1M;
                        client_body_buffer_size 512k;

                        proxy_buffering on;
                        proxy_connect_timeout 5;
                        proxy_send_timeout 60;
                        proxy_read_timeout 60;

                        add_header Nginx-Cache "$upstream_cache_status";
                        expires 10m;
            add_header Cache-Control no-transform;

                        proxy_cache static;
                        proxy_ignore_headers Cache-Control;
                        proxy_ignore_headers Expires;
                        proxy_ignore_headers Set-Cookie;
                        proxy_cache_valid 200 1h;
                        proxy_cache_key "$host$uri";
                }

                location ~ /$ {
                        proxy_pass http://idirector;
                        proxy_set_header Host $host;

                        client_max_body_size 1M;
                        client_body_buffer_size 512k;

                        proxy_buffering on;
                        proxy_connect_timeout 5;
                        proxy_send_timeout 60;
                        proxy_read_timeout 60;

                        add_header Nginx-Cache "$upstream_cache_status";
                        expires 10m;
            add_header Cache-Control no-transform;

                        proxy_cache static;
                        proxy_ignore_headers Cache-Control;
                        proxy_ignore_headers Expires;
                        proxy_ignore_headers Set-Cookie;
                        proxy_cache_valid 200 1d;
                        proxy_cache_key "$host$uri";
                }

                location / {
            limit_req zone=one burst=100 nodelay;

                        proxy_pass http://idirector;
                        proxy_set_header Host $host;
                        proxy_set_header X-Real-IP $remote_addr;
                        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

                        client_max_body_size 1M;
                        client_body_buffer_size 512k;

                        proxy_buffering off;
                        proxy_connect_timeout 5;
                        proxy_send_timeout 60;
                        proxy_read_timeout 60;
                }
        }

        server {
                listen 0.0.0.0:80;
                server_name 113.31.18.201 113.31.18.202 cwan.com *.cwan.com;

                if ($host ~ "113.31.18.20\d") {
                        rewrite ^ http://www.cwan.com$request_uri? permanent;
                }

                if ($host = "cwan.com") {
                        rewrite ^ http://www.cwan.com$request_uri? permanent;
                }

                if ($host = "ku.cwan.com") {
                        rewrite ^ http://www.cwan.com/webgame$request_uri? permanent;
                }

                if ($host = "sxd.cwan.com") {
                        rewrite ^ http://www.cwan.com/sxd$request_uri? permanent;
                }

                if ($host = "sq.cwan.com") {
                        rewrite ^ http://www.cwan.com/webgame/sq$request_uri permanent;
                }

                if ($host = "sgs.cwan.com") {
                        rewrite ^ http://www.cwan.com/sgs$request_uri permanent;
                }

                if ($host = "roco.cwan.com") {
                        rewrite ^ http://www.cwan.com/roco$request_uri permanent;
                }

                if ($host = "bl.cwan.com") {
                        rewrite ^ http://www.cwan.com/webgame/blswz$request_uri permanent;
                }

                if ($host = "zl.cwan.com") {
                        rewrite ^ http://www.cwan.com/webgame/qqzl$request_uri permanent;
                }

        if ($host = "dhh.cwan.com") {
            rewrite ^ http://www.cwan.com/zt/dhhsj$request_uri permanent;
        }

                rewrite ^/([^.]+[^/])$ /$1/ permanent;

                location ~ /purge(/.*) {
                        proxy_cache_purge static $host$1;
                }

                location ~ \.(css|js|ico|jpg|png|gif|swf)$ {
                        proxy_pass http://idirector;
                        proxy_set_header Host $host;

                        client_max_body_size 1M;
                        client_body_buffer_size 512k;

                        proxy_buffering on;
                        proxy_connect_timeout 5;
                        proxy_send_timeout 60;
                        proxy_read_timeout 60;

                        add_header Nginx-Cache "$upstream_cache_status";
                        expires 10m;

                        proxy_cache static;
                        proxy_ignore_headers Cache-Control;
                        proxy_ignore_headers Expires;
                        proxy_ignore_headers Set-Cookie;
                        proxy_cache_valid 200 1h;
                        proxy_cache_key "$host$uri";
                }

                location ~ \.(shtml|html|xml)$ {
                        proxy_pass http://idirector;
                        proxy_set_header Host $host;

                        client_max_body_size 1M;
                        client_body_buffer_size 512k;

                        proxy_buffering on;
                        proxy_connect_timeout 5;
                        proxy_send_timeout 60;
                        proxy_read_timeout 60;

                        add_header Nginx-Cache "$upstream_cache_status";
                        expires 10m;
            add_header Cache-Control no-transform;

                        proxy_cache static;
                        proxy_ignore_headers Cache-Control;
                        proxy_ignore_headers Expires;
                        proxy_ignore_headers Set-Cookie;
                        proxy_cache_valid 200 1h;
                        proxy_cache_key "$host$uri";
                }

                location ~ /$ {
            limit_req zone=one burst=100 nodelay;

                        proxy_pass http://idirector;
                        proxy_set_header Host $host;

                        client_max_body_size 1M;
                        client_body_buffer_size 512k;

                        proxy_buffering on;
                        proxy_connect_timeout 5;
                        proxy_send_timeout 60;
                        proxy_read_timeout 60;

                        add_header Nginx-Cache "$upstream_cache_status";
                        expires 10m;
            add_header Cache-Control no-transform;

                        proxy_cache static;
                        proxy_ignore_headers Cache-Control;
                        proxy_ignore_headers Expires;
                        proxy_ignore_headers Set-Cookie;
                        proxy_cache_valid 200 1m;
                        proxy_cache_key "$host$uri";
                }

                location /820ac16d {
                        deny all;
                }

                location / {
                        proxy_pass http://idirector;
                        proxy_set_header Host $host;
                        proxy_set_header X-Real-IP $remote_addr;
                        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

                        client_max_body_size 1M;
                        client_body_buffer_size 512k;

                        proxy_buffering off;
                        proxy_connect_timeout 5;
                        proxy_send_timeout 60;
                        proxy_read_timeout 60;
                }
        }

        server {
                listen 0.0.0.0:80;
                server_name cgirls.cn www.cgirls.cn;

        rewrite ^ http://cgirls.cwan.com$request_uri? permanent;
        }

        server {
                listen 0.0.0.0:80;
                server_name api.cwan.com ugc.cwan.com mcp.cwan.com kf.cwan.com;
                location / {
            limit_req zone=one burst=100 nodelay;

                        proxy_pass http://idirector;
                        proxy_set_header Host $host;
                        proxy_set_header X-Real-IP $remote_addr;
                        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

                        client_max_body_size 1M;
                        client_body_buffer_size 256k;
                        proxy_buffering off;
                        proxy_connect_timeout 5;
                        proxy_send_timeout 60;
                        proxy_read_timeout 60;
                }

        }

        server {
                listen 0.0.0.0:80;
                server_name cwan.xuetu.com;

                rewrite ^/([^.]+[^/])$ /$1/ permanent;

                location /js/ {
                        alias /mnt/www/cwebgame/CZ01VW91/js/;
                }

                location /img/ {
                        alias /mnt/www/cwebgame/CZ01VW91/img/;
                }

                location /css/ {
                        alias /mnt/www/cwebgame/CZ01VW91/css/;
                }

                location / {
                        proxy_pass http://idirector;
                        proxy_set_header Host $host;
                        proxy_set_header X-Real-IP $remote_addr;
                        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                        client_max_body_size 1M;
                        client_body_buffer_size 512k;
                        proxy_connect_timeout 10;
                        proxy_send_timeout 10;
                        proxy_read_timeout 60;
                        proxy_buffering off;
                }

                location /kf/ {
                        proxy_pass http://kf.cwan.com/;
                }
        }

        server {
                listen 0.0.0.0:80;
                server_name xianjian.cwan.com;

        location /images/ {
            alias /mnt/www/cwebgame/images/;
        }

        location /uploads/ {
            alias /mnt/www/cwebgame/uploads/;
        }

                location / {
                        proxy_pass http://www.cwan.com/webgame/xxj/;
                        client_max_body_size 1M;
                        client_body_buffer_size 512k;
                        proxy_connect_timeout 10;
                        proxy_send_timeout 10;
                        proxy_read_timeout 60;
                        proxy_buffering off;
                }
        }

        server {
                listen 0.0.0.0:80;
                server_name www.youxiduo.com;

        if ($http_user_agent ~* "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(A
U.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC\-Browser)|(
Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT\-)|(SonyEricsson)|(NEC\-)|(Alcatel)|(Ericss
on)|(BENQ)|(Amoisonic)|(Amoi\-)|(Capitel)|(PHILIPS)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(
SHARP)|(WAPPER)|(LG\-)|(LG/)|(EG900)|(CECT)|(Compal)|(kejian)|(BIRD)|(G900/V1.0)|(Arima)|(C
TL)|(TDG)|(DAXIAN)|(DBTEL)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|(LE
NOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC\-)|(SED\-)|(EMOL\-)|(INNO55)|(ZTE)|(iPhone)|(Android)|
(Windows CE)|(Opera)") {
    #rewrite ^ http://m.youxiduo.com$request_uri? permanent;
    rewrite ^ http://api.cwan.com/go.php?t=$request_uri? permanent;
}
                rewrite ^/([^.]+[^/])$ /$1/ permanent;

                location ~ /purge(/.*) {
                        proxy_cache_purge static $host$1;
                }

                location ~ \.(css|js|ico|jpg|png|gif|swf)$ {
                        proxy_pass http://idirector;
                        proxy_set_header Host $host;

                        client_max_body_size 1M;
                        client_body_buffer_size 512k;

                        proxy_buffering on;
                        proxy_connect_timeout 5;
                        proxy_send_timeout 60;
                        proxy_read_timeout 60;

                        add_header Nginx-Cache "$upstream_cache_status";
                        expires 10m;

                        proxy_cache static;
                        proxy_ignore_headers Cache-Control;
                        proxy_ignore_headers Expires;
                        proxy_ignore_headers Set-Cookie;
                        proxy_cache_valid 200 1h;
                        proxy_cache_key "$host$uri";
                }

                location ~ \.(shtml|html|xml)$ {
                        proxy_pass http://idirector;
                        proxy_set_header Host $host;

                        client_max_body_size 1M;
                        client_body_buffer_size 512k;

                        proxy_buffering on;
                        proxy_connect_timeout 5;
                        proxy_send_timeout 60;
                        proxy_read_timeout 60;

                        add_header Nginx-Cache "$upstream_cache_status";
                        expires 10m;
            add_header Cache-Control no-transform;

                        proxy_cache static;
                        proxy_ignore_headers Cache-Control;
                        proxy_ignore_headers Expires;
                        proxy_ignore_headers Set-Cookie;
                        proxy_cache_valid 200 1h;
                        proxy_cache_key "$host$uri";
                }

                location ~ /$ {
                        proxy_pass http://idirector;
                        proxy_set_header Host $host;

                        client_max_body_size 1M;
                        client_body_buffer_size 512k;

                        proxy_buffering on;
                        proxy_connect_timeout 5;
                        proxy_send_timeout 60;
                        proxy_read_timeout 60;

                        add_header Nginx-Cache "$upstream_cache_status";
                        expires 10m;
            add_header Cache-Control no-transform;

                        proxy_cache static;
                        proxy_ignore_headers Cache-Control;
                        proxy_ignore_headers Expires;
                        proxy_ignore_headers Set-Cookie;
                        proxy_cache_valid 200 1d;
                        proxy_cache_key "$host$uri";
                }

                location / {
                        proxy_pass http://idirector;
                        proxy_set_header Host $host;
                        proxy_set_header X-Real-IP $remote_addr;
                        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

                        client_max_body_size 1M;
                        client_body_buffer_size 512k;

                        proxy_buffering off;
                        proxy_connect_timeout 5;
                        proxy_send_timeout 60;
                        proxy_read_timeout 60;
                }
        }

    server {
        listen 0.0.0.0:80;
        server_name chanye.cwan.com;

        location / {
            #allow 180.166.98.98;
            #deny all;
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 1M;
            client_body_buffer_size 256k;
            proxy_connect_timeout 10;
            proxy_send_timeout 10;
            proxy_read_timeout 60;
            proxy_buffering off;
        }
    }

    server {
        listen 0.0.0.0:80;
        server_name www.imbagame.com;
        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

            client_max_body_size 1M;
            client_body_buffer_size 512k;

            proxy_buffering off;
            proxy_connect_timeout 5;
            proxy_send_timeout 60;
            proxy_read_timeout 60;
        }
    }

    server {
        listen 0.0.0.0:80;
        server_name youxiduo.com;
        if ($host = "youxiduo.com") {
            rewrite ^ http://www.youxiduo.com$request_uri? permanent;
        }

   }

   server {
        listen 0.0.0.0:80;
        server_name apk.cwan.com;
        location / {
            proxy_pass http://idirector;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

            client_max_body_size 1M;
            client_body_buffer_size 512k;

            proxy_buffering off;
            proxy_connect_timeout 5;
            proxy_send_timeout 60;
            proxy_read_timeout 60;
        }
   }

}

cwan Nginx 配置

时间: 2024-10-19 02:30:41

cwan Nginx 配置的相关文章

linux学习笔记——搭建基于nginx的web服务器、多核配置、nginx配置参数

############ 认识nginx #############Nginx:(发音同 engine x)是一款轻量级的Web服务器/反向代理服务器及电子邮件(IMAP/POP3)代理服务器,并在一个BSD-like 协议下发行.由俄罗斯的程序设计师Igor Sysoev所开发,最初供俄国大型的入口网站及搜寻引擎Rambler(俄文:Рамблер)使用.  其优点是轻量级(占有内存少),高并发(并发能力强),事实上nginx的并发能力确实在同类型的网页伺服器中表现较好.目前中国大陆使用ngi

12.17 Nginx负载均衡;12.18 ssl原理;12.19 生产ssl密钥对;12.20 Nginx配置ssl

扩展: 针对请求的uri来代理 http://ask.apelearn.com/question/1049 根据访问的目录来区分后端web http://ask.apelearn.com/question/920 12.17 Nginx负载均衡 1. 安装dig命令: [[email protected] ~]# yum install -y bind-utils 2. 用dig获取qq.com的ip地址: [[email protected] ~]# dig qq.com 3. 创建ld.co

Nginx配置详解

Nginx配置文件主要分成四部分: main(全局设置)指令将影响其它所有部分的设置: server(主机设置)指令主要用于指定虚拟主机域名.IP和端口: upstream(上游服务器设置,主要为反向代理.负载均衡相关配置)指令用于设置一系列的后端服务器,设置反向代理及后端服务器的负载均衡: location(URL匹配特定位置后的设置),每部分包含若干个指令.location部分用于匹配网页位置(比如,根目录"/","/images",等等). 他们之间的关系式:

LNMP架构应用实战——Nginx配置虚拟主机

LNMP架构应用实战--Nginx配置虚拟主机        前面介绍了nginx服务的安装与配置文件,今天介绍下它的另一种实用配置--"虚拟主机",每个虚拟主机可以是一个独立的网站,可以具有独立的域名,同一台服务器上的不同的虚拟主机之间是独立的,用户访问不同虚拟主机如同访问不同的服务器一样,因此它不需要为一个单独的WEB站点提供单独一个nginx服务器和一个单独的nginx进程 1.nginx虚拟主机简单介绍 同apache服务一样,它也有三种不同的虚拟主机,基于域名的虚拟主机.基于

Nginx 配置

Nginx 配置 不论是本地开发,还是远程到 Server 开发,还是给提供 demo 给人看效果,我们时常需要对 Nginx 做配置,Nginx 的配置项相当多,如果考虑性能配置起来会比较麻烦.不过,我们往往只是需要一个静态 Server,或者一个反向代理 Server,这对 Nginx 来说小菜一碟. 本文将给大家介绍 Nginx 配置的基本知识,不想细看的同学可以直接跳到最后一个例子. 简介 Nginx 的安装就不解释了,方便起见,建议在各平台可以直接执行对应安装命令: # CentOS

nginx 配置详解

Nginx是一款轻量级的Web 服务器/反向代理服务器及电子邮件(IMAP/POP3)代理服务器,并在一个BSD-like 协议下发行.由俄罗斯的程序设计师Igor Sysoev所开发,供俄国大型的入口网站及搜索引擎Rambler(俄文:Рамблер)使用.其特点是占有内存少,并发能力强,事实上nginx的并发能力确实在同类型的网页服务器中表现较好,中国大陆使用nginx网站用户有:京东.新浪.网易.腾讯.淘宝等. 一.event模型 传统的基于进程和线程的模型在处理并发连接的时候针对每个连接

Nginx配置多个基于域名的虚拟主机+实验环境搭建+测试

标签:Linux 域名 Nginx 原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 .作者信息和本声明.否则将追究法律责任.http://xpleaf.blog.51cto.com/9315560/1901284 0.说明 使用Nginx可以配置基于域名的虚拟主机.基于端口的虚拟主机和基于端口的虚拟主机,比较常用的是基于域名的虚拟主机,这里要做的配置是基于域名的虚拟主机,并且是配置多个基于域名的虚拟主机. 关于Nginx配置文件的说明可以参考官方文档,同时也可以参考老男孩老师的书

你真的了解如何将 Nginx 配置为Web服务器吗

阅读之前,建议先阅读初识 Nginx. 之后,我们来了解一下 Nginx 配置. 抽象来说,将 Nginx 配置为 Web 服务器就是定义处理哪些 URLS 和如何处理这些URLS 对应的请求.具体来说,就是定义一些虚拟服务器(Virtual Servers),控制具有特定 IP 和域名的请求. 更具体的来说, Nginx 通过定义一系列 locations 来控制对 URIS 的选择.每一个 location 定义了对映射到自己的请求的处理场景:返回一个文件或者代理请求,或者根据不同的错误代码

nginx配置文件结构

nginx配置文件结构 全局参数 配置系统全局参数 如:worker_processes 工作子进程数量.error_log 错误日志路径.pid 进程ID Event 一般是配置nginx工作模式及连接的特性 如: worker_connections 1024; // 一个子进程最大允许连1024个连接 http 配置http服务器的主要段 (1)http参数部分 如连接超时时间.压缩.缓冲等 (2)upstream 负载均衡设置 (3)server 配置虚拟主机 可以包含多个locatio