nginx stable ver. in freebsd ports collection

Vladimir Getmanshchuk vladget at openfilm.com
Mon Jun 1 19:29:51 MSD 2009


# sysctl net.inet.tcp.nolocaltimewait
net.inet.tcp.nolocaltimewait: 0


2009/6/1 Alexey V. Karagodov <kav at karagodov.name>:
> net.inet.tcp.nolocaltimewait=1
> случайно не используется?
>
> On 01.06.2009, at 18:27, Vladimir Getmanshchuk wrote:
>
>> О!
>> Не перегружал nginx после зависание и нашел очереди:
>>
>> # netstat -Lan
>> Current listen queue sizes (qlen/incqlen/maxqlen)
>> Proto Listen         Local Address
>> tcp4  314/0/4096     *.80
>>
>>
>> 2009/6/1 Igor Sysoev <is at rambler-co.ru>:
>>>
>>> On Mon, Jun 01, 2009 at 03:23:54PM +0300, Vladimir Getmanshchuk wrote:
>>>
>>>> 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;
>>>>        }
>>>>    }
>>>>
>>>> }
>>>
>>> На www.rambler.ru без проблем используется подобная же функциональность
>>> за исключением upload'ов.
>>>
>>>
>>> --
>>> Игорь Сысоев
>>> http://sysoev.ru
>>>
>>>
>>
>>
>>
>> --
>> Yours sincerely,
>> Vladimir Getmanshchuk
>>
>> Senior Unix System Administrator
>> Openfilm, LLC
>>
>> Email: vladget at openfilm.com
>> Skype: vladimir.getmanshchuk
>>
>
>
>



-- 
Yours sincerely,
Vladimir Getmanshchuk

Senior Unix System Administrator
Openfilm, LLC

Email: vladget at openfilm.com
Skype: vladimir.getmanshchuk





More information about the nginx-ru mailing list