nginx stable ver. in freebsd ports collection

Vladimir Getmanshchuk vladget at openfilm.com
Mon Jun 1 16:23:54 MSD 2009


user site site;
worker_processes  2; # last value 8

error_log   /var/log/nginx-error.log info;
#[info | error | debug]

events {
  worker_connections 4096;
  use kqueue;
#  multi_accept on;
}

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

    log_format main  '$remote_addr - $remote_user [$time_local] $status '
    '"$request" $body_bytes_sent "$http_referer" '
    '"$http_user_agent" "http_x_forwarded_for"';
    access_log /var/log/nginx-access.log main;

    sendfile       on;
    tcp_nopush     on;
    tcp_nodelay    on;
    server_names_hash_bucket_size   64;
    reset_timedout_connection on;

    keepalive_timeout  65;

#    gzip on;
#    gzip_min_length 0;
#    gzip_proxied any;
#    gzip_types text/html text/plain text/css application/x-javascript
application/xml;

    upload_progress proxied 1m;

    #Fixing hw lb errors
    geo $lb  {
     default      0;
     192.168.100.130  1;   # LB IPs
    }

    server {
        listen       80;
        server_name  site.com www.site.com;
        access_log  /usr/local/www/log/nginx-www.site.com-access.log  main;

        # Main location
        location / {
            proxy_pass         http://127.0.0.1:8080/;
            track_uploads proxied 30s;
        }
        # Static files location
        location ~ ^/(images|javascript|js|css|flash|media|static)/  {
           root    /usr/local/www/www/;
           expires 30d;
        }
        # Upload progress
        location ^~ /progress {
            report_uploads proxied;
        }
        # Server status
        location /status {
           stub_status on;
           access_log   off;
           allow   127.0.0.1;
           deny    all;
        }
        # Error pages
        error_page 400 /400;

        # 400
        location = /400 {
           if ($lb) {
             access_log  off;
                }
             return 400;
        }
    }
    server {
        listen       80;
        server_name  www1.site.com;
        #access_log  /usr/local/www/log/nginx-www.site.com-two-access.log  main;

        # Main location
        location / {
            proxy_pass         http://127.0.0.1:8080/;
            track_uploads proxied 30s;
        }
        # Static files location
        location ~ ^/(images|javascript|js|css|flash|media|static)/  {
           root    /usr/local/www/www1/;
           expires 30d;
        }
        # Upload progress
        location ^~ /progress {
            report_uploads proxied;
        }
        # Server status
        location /status {
           stub_status on;
           access_log   off;
           allow   127.0.0.1;
           deny    all;
        }
        # Error pages
        error_page 400 /400;

        # 400
        location = /400 {
           if ($lb) {
             access_log  off;
                }
             return 400;
        }
    }

}



2009/6/1 Михаил Монашёв <postmaster at softsearch.ru>:
> Здравствуйте, Владимир.
>
> VG> После того как я обновился с с прошлого стейбла (0.6.35) на
> VG> новый в портах (0.7.59) моя жизнь превратиласть в Ад;
> VG> nginx постоянно "залипает", не отвечает на запросы.Nginx hf,jnf
>
> top и конфиг nginx-а можете запостить сюда?
>
>
> --
>
> С уважением,
> Михаил Монашёв, SoftSearch.ru
> mailto:postmaster at softsearch.ru
> ICQ# 166233339
> http://michael.mindmix.ru/
> Без бэкапа по жизни.
>
>
>



-- 
Yours sincerely,
Vladimir Getmanshchuk





More information about the nginx-ru mailing list