<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    瘋狂

    STANDING ON THE SHOULDERS OF GIANTS
    posts - 481, comments - 486, trackbacks - 0, articles - 1
      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

    Nginx tomcat負載配置

    Posted on 2011-02-15 23:08 瘋狂 閱讀(657) 評論(0)  編輯  收藏 所屬分類: 架構

    Nginx.conf :

    user  oschina;
    worker_processes  2;

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

    #pid        logs/nginx.pid;

    events {
        use epoll;
        worker_connections  2048;
    }

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

        #log_format  main  '$remote_addr - $remote_user [$time_local] $request '
        #                  '"$status" $body_bytes_sent "$http_referer" '
        #                  '"$http_user_agent" "$http_x_forwarded_for"';

        #access_log  off;
        access_log  logs/access.log;

        client_header_timeout  3m;
        client_body_timeout    3m;
        send_timeout           3m;
     
        client_header_buffer_size    1k;
        large_client_header_buffers  4 4k;

        sendfile        on;
        tcp_nopush      on;
        tcp_nodelay     on;

        #keepalive_timeout  75 20;

        include    gzip.conf;
       
        server {
        listen 80;
        server_name .oschina.net;
        location / {
            rewrite (.*) http://www.test.net$1 permanent;
        }
        }

        server {
        listen 80;
        server_name www.test.net;

            log_format  oschina_log
            '$remote_addr - $remote_user [$time_local] $request '
            '"$status" $body_bytes_sent "$http_referer" '
            '"$http_user_agent" "$http_x_forwarded_for"';
            access_log  logs/oschina.log;

        location ~ ^/(WEB-INF)/ {
                deny all;
            }

            location ~ \.(apk|torrent|htm|html|asp|php|gif|jpg|jpeg|png|bmp|ico|rar|css|js|zip|java|jar|txt|flv|swf|mid|doc|ppt|xls|pdf|txt|mp3|wma)$ {
                root /data/oschina/webapp;
            access_log off;
                expires 24h;
            }
           
        location ~ ^/uploads/ {
            access_log off;
                root /data/test/webapp;
            expires 24h;
            }

        location / {
            proxy_pass http://localhost:8080;
            include proxy.conf;
        }

        error_page 502 503 /502.html;
            error_page 404 /404.html;
        error_page 403 /403.html;
        }
    }

    gzip.conf:

    gzip              on;
    gzip_min_length      1000;
    gzip_types         text/plain text/css application/x-javascript;

    proxy.conf:

    proxy_redirect          off;
    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 128k;
    proxy_connect_timeout   300;
    proxy_send_timeout      300;
    proxy_read_timeout      300;
    proxy_buffer_size       4k;
    proxy_buffers           4 32k;
    proxy_busy_buffers_size 64k;
    proxy_temp_file_write_size 64k;

    主站蜘蛛池模板: 亚洲人成在线免费观看| 亚洲色欲一区二区三区在线观看| 中文字幕亚洲免费无线观看日本| 国产在线国偷精品免费看| 久久精品国产精品亚洲艾草网美妙| 国产精品亚洲а∨天堂2021| 日韩免费一区二区三区| 国产亚洲精品免费| 亚洲毛片不卡av在线播放一区| 成人久久久观看免费毛片| 亚洲无码高清在线观看| 中国一级特黄高清免费的大片中国一级黄色片 | 亚洲第一综合天堂另类专| 午夜一级免费视频| 国产偷国产偷亚洲高清在线| 亚洲国产成人久久笫一页| kk4kk免费视频毛片| 亚洲VA中文字幕无码毛片| 日韩免费无码视频一区二区三区 | 亚洲一区二区三区久久| 妞干网免费观看视频| 爱情岛论坛免费视频| 久久精品国产亚洲沈樵| 91精品国产免费入口| 亚洲一本一道一区二区三区| 免费一区二区三区四区五区| 国产日韩AV免费无码一区二区 | 国产日本亚洲一区二区三区| 国产片免费福利片永久| 天堂在线免费观看| 亚洲成a人片在线网站| 免费真实播放国产乱子伦| a级成人毛片免费视频高清| 亚洲国产中文在线视频| 亚洲成a人片在线观看久| 99久久人妻精品免费一区| 亚洲欧美中文日韩视频| 亚洲精品乱码久久久久久| 中文字幕av无码无卡免费| 国产免费久久精品99久久| 亚洲人xxx日本人18|