一区二区三区日韩精品-日韩经典一区二区三区-五月激情综合丁香婷婷-欧美精品中文字幕专区

分享

nginx配置, 亂得可以

 thy 2009-07-23
user  www www;
worker_processes  4;
error_log  logs/error.log crit;
pid        logs/nginx.pid;

worker_rlimit_nofile 51200;

events {
    use epoll;
    worker_connections  51200;
}

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

    sendfile    on;
    keepalive_timeout 65;
    tcp_nodelay on;

#----for self site(help and mail)----------------------------------------
        server_names_hash_bucket_size 128;
        client_header_buffer_size 32k;
        large_client_header_buffers 4 32k;
        client_max_body_size 20m;


        fastcgi_connect_timeout 300;
        fastcgi_send_timeout 300;
        fastcgi_read_timeout 300;
        fastcgi_buffer_size 64k;
        fastcgi_buffers 4 64k;
        fastcgi_busy_buffers_size 128k;
        fastcgi_temp_file_write_size 128k;

        gzip on;
        gzip_min_length  1k;
        gzip_buffers     4 16k;
        gzip_http_version 1.0;
        gzip_comp_level 2;
        gzip_types       text/plain application/x-javascript text/css application/xml;
        gzip_vary on;
#-----------------------------------------------------------------------

    # server pool
    upstream bspfrontsvr {
            server 192.168.1.12:80   weight=1;
    }
   
    upstream bspimgsvr {
            server 192.168.1.16:80   weight=1;
    }
   
    upstream bspstylesvr {
            server 192.168.1.18:80   weight=1;
    }
   
   
    upstream bspwsisvr {
            server 192.168.1.11:80   weight=1;
    }
   
    upstream bspadminsvr {
            server 192.168.1.14:80   weight=1;
    }
   
    upstream bspbuyersvr {
            server 192.168.1.17:80   weight=1;
    }
   
    upstream bspsellersvr {
            server 192.168.1.15:80   weight=1;
    }


    upstream  bspregistersvr  {
            server 192.168.1.13:80  weight=1;
    }


    upstream  wwwolsvr  {
            server 192.168.1.41:80  weight=1;
    }

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

#--------------------------------------------------------------------

###for self site
#help.
server
{
   listen       192.168.1.30:80;
   server_name  help.;
   index index.html index.htm index.php;
   root  /data0/htdocs/help;

   #limit_conn   crawler  20;   
                           
   location ~ .*\.(php|php5)?$
   {     
     #fastcgi_pass  unix:/tmp/php-cgi.sock;
     fastcgi_pass  127.0.0.1:9000;
     fastcgi_index index.php;
     include fcgi.conf;
  }
  
   location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
   {
     expires      30d;
   }

   location ~ .*\.(js|css)?$
   {
     expires      1h;
   }   

   access_log  logs/help.log  foo_com;

   error_page   500 502 503 504 404 /50x.html;
   location = /50x.html {
           root   html;
   }
}
   
#mail.
server
{
   listen       192.168.1.30:80;
   listen       127.0.0.1:80;
   server_name  mail.;
   index index.html index.htm index.php;
   root  /data0/htdocs/mail;

   #limit_conn   crawler  20;

   location ~ .*\.(php|php5)?$
   {
     #fastcgi_pass  unix:/tmp/php-cgi.sock;
     fastcgi_pass  127.0.0.1:9000;
     fastcgi_index index.php;
     include fcgi.conf;
   }

#   location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
#   {
#     expires      30d;
#   }

   location ~ .*\.(js|css)?$
   {
     expires      1h;
   }

   #---------for awstats--------------------
   location /awstats {
      root /usr/local/awstats/wwwroot/;
      auth_basic "admin";
      auth_basic_user_file /usr/local/awstats/htpasswd.users;
      include awstats.conf;
   }

  #---------for nagios--------------------
   location /nagios/ {
      alias /data0/htdocs/mail/nagios/share/;
      auth_basic "admin";
      auth_basic_user_file /data0/htdocs/mail/nagios/etc/htpasswd.users;
   }
   location /nagios/cgi-bin/ {
      include nagios_cgi.conf;
   }

   access_log  logs/mail.log  foo_com;
}
   
###reveres proxy server-------------------------------------------------------
    #img.
    server {
        listen       192.168.1.30:80;
        server_name  img.;

        location / {
                        proxy_pass      http://bspimgsvr;

                        include         proxy_setting.conf;

        }
        access_log  logs/img.log  foo_com;
    }
   
    #style.
    server {
        listen       192.168.1.30:80;
        server_name  style.;

        location / {
                        proxy_pass      http://bspstylesvr;

                        include         proxy_setting.conf;
        }
        access_log  logs/style.log  foo_com;
    }
   
   
    #admin.
    server {
        listen       192.168.1.30:80;
        server_name  admin.;

        location / {
                        proxy_pass      http://bspadminsvr;

                        include         proxy_setting.conf;
        }
        access_log  logs/admin.log  foo_com;
    }
   
    #buyer.
    server {
        listen       192.168.1.30:80;
        server_name  buyer.;

        location / {
                        proxy_pass      http://bspbuyersvr;

                        include         proxy_setting.conf;
        }
        access_log  logs/buyer.log  foo_com;
    }
   
    #seller.
    server {
        listen       192.168.1.30:80;
        server_name  seller.;

        location / {
                        proxy_pass      http://bspsellersvr;

                        include         proxy_setting.conf;
        }
        access_log  logs/seller.log  foo_com;
    }

    #wsi.
    server {
        listen       192.168.1.30:80;
        server_name  wsi.;

        location / {
                        proxy_pass      http://bspwsisvr;

                        #include         proxy_setting.conf;
        }
        access_log  logs/wsi.log  foo_com;
    }

    #*. www.
    server {
        listen       192.168.1.30:80;
        server_name  www.   *.    ;

        location ~ ^/NginxStatus/ {
            stub_status on;
            access_log off;
        }

        location / {
                        proxy_pass      http://bspfrontsvr;

                        include         proxy_setting.conf;
        }
        access_log  logs/www.log  foo_com;

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

    #login. for register
    server {
        listen       192.168.1.30:80;
        server_name  login.;

        location / {
                        proxy_pass        http://bspregistersvr;

                        include         proxy_setting.conf;
        }  
        access_log  logs/register.log  foo_com;
    } 

   
}

    本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報。
    轉(zhuǎn)藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多

    国产传媒欧美日韩成人精品| 亚洲中文字幕高清乱码毛片| 亚洲黄色在线观看免费高清| 一区二区三区四区亚洲另类| 国产一区二区不卡在线播放| 亚洲男人的天堂就去爱| 日韩人妻毛片中文字幕| 欧美一级特黄大片做受大屁股| 日本熟妇熟女久久综合| 久久99精品日韩人妻| 日本久久精品在线观看| 亚洲少妇人妻一区二区| 韩日黄片在线免费观看| 亚洲精品国产美女久久久99| 日本不卡在线视频你懂的 | 人妻亚洲一区二区三区| 久久精品国产在热久久| 国产成人精品一区二三区在线观看| 污污黄黄的成年亚洲毛片 | 91天堂素人精品系列全集| 欧美黑人暴力猛交精品| 午夜直播免费福利平台| 成人你懂的在线免费视频| 欧美色欧美亚洲日在线| 又色又爽又黄的三级视频| 日韩精品少妇人妻一区二区| 极品熟女一区二区三区| 大香伊蕉欧美一区二区三区| 男人操女人下面国产剧情| 99国产精品国产精品九九| 国产中文字幕一区二区| 激情亚洲一区国产精品久久| 亚洲午夜福利不卡片在线| 国产免费人成视频尤物| 国产不卡免费高清视频| 欧美视频在线观看一区| 国产精品福利一二三区| 国产精品欧美一区二区三区不卡| 国产亚洲视频香蕉一区| 日本东京热视频一区二区三区| 久久精品国产99精品亚洲|