ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

проблемы с кэшированием, в ерсия 0.8.54


  • To: nginx-ru@xxxxxxxxx
  • Subject: проблемы с кэшированием, в ерсия 0.8.54
  • From: Александр Рочев <foxr@xxxxxxx>
  • Date: Mon, 20 Dec 2010 22:54:12 +0300
  • Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail; h=Message-Id:Content-Type:Reply-To:Date:Mime-Version:Subject:To:From; bh=vD2EcyKAIEg2KTHK5EHokLyMQwqEKIIETQWmr6FgqJE=; b=KNanTZh+TmiCwdApLfwW9h/H3ZrWuVufbfU2xoObbGOtUjDwOVWy9GxY7eCozYcCaCJ9iS9qydjhWqgfq9HmYrViB9a77z8CoMJ2tWnniT5rnWgsmI6AhxDX2LGhZEAZ;

При работе с энджин икс столкнулся с проблемой кеширования.Суть в том, что не происходит запись закешированных файлов в определенную папку.
До принятия решения о кешировании все модули и параметры были всегда внимательно прочитаны на вашем сайте и проблем никогда не возникало, но в данной ситуации не получается так же просто как и раньше.
Система FreeBSD.
Полный конфиг:

Генеральный конфиг:
user  www www;

worker_processes  8;

error_log  /pub/log/nginx/error_log  notice;

pid        /var/run/nginx.pid;

events {
    worker_connections  4000;
    use kqueue;
        }

http {
    include       mime.types;
    default_type  application/octet-stream;
    server_names_hash_bucket_size 1024;
    client_header_timeout  1m;
    client_body_timeout    1m;
    send_timeout           1m;
    keepalive_timeout      1m;
    sendfile               on;
    tcp_nopush             on;
    tcp_nodelay            on;
    send_lowat             12000;
    client_max_body_size   20m;
    proxy_connect_timeout  60;
    proxy_send_timeout     60;
    proxy_read_timeout     60;
    proxy_buffer_size      64k;
    proxy_buffers          4 32k;
    proxy_busy_buffers_size 64k;
    proxy_buffering        off;
    large_client_header_buffers 4 16k;
    gzip                    on;
    gzip_min_length        1000;
    gzip_proxied           any;
    gzip_types             text/plain text/xml application/xml application/x-_javascript_ text/_javascript_ text/css text/json;
    gzip_disable           "msie6";
    gzip_comp_level        6;

    proxy_cache_path /home/www/cache levels=1:2 keys_zone=one:20m;

    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  /pub/log/nginx/access_log  main;

server {
        listen 80 default rcvbuf=8k sndbuf=16k;
       }

include     /usr/local/etc/nginx/vhosts/*;



Виртуал хост:

upstream bak {
    server 127.0.0.1:2003;
             }


server {

reset_timedout_connection on;

listen ip:80;

server_name    test.ru www.test.ru;

location ~* ^.+\.(htm|html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js)$ {
             &nb sp;          root /pub/home/vand/www2.vand.ru/www;

access_log off;
expires 3h;
        }

location ~ /\.ht {
                deny  all;
                    }

location / {

        proxy_set_header        Host $http_host;
        proxy_set_header        X-Real-IP $remote_addr;
        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://bak/;
        proxy_cache one;
        proxy_cache_valid 200 301 302 304 5m;
        proxy_cache_key "$host$request_uri $cookie_user";
        proxy_hide_header "Set-Cookie";
        proxy_ignore_headers "Cache-Control" "Expires";
    }
        }

Версия nginx: 0.8.54

Проблема: не кешируются страницы, в созданной папке не появляется ни один файл. Проблема конфига или же все таки версии энджин икса?

Вот кусок из еррор лога:

2010/12/20 22:11:05 [notice] 19761#0: using the "kqueue" event method
2010/12/20 22:11:05 [notice] 19761#0: nginx/0.8.54
2010/12/20 22:11:05 [notice] 19761#0: OS: FreeBSD 7.2-RELEASE
2010/12/20 22:11:05 [notice] 19761#0: kern.osreldate: 702000, built on 702000
2010/12/20 22:11:05 [notice] 19761#0: hw.ncpu: 12
2010/12/20 22:11:05 [notice] 19761#0: machdep.hlt_logical_cpus: 0
2010/12/20 22:11:05 [ notice] 19761#0: net.inet.tcp.sendspace: 32768
2010/12/20 22:11:05 [notice] 19761#0: kern.ipc.somaxconn: 128
2010/12/20 22:11:05 [notice] 19761#0: getrlimit(RLIMIT_NOFILE): 11095:11095
2010/12/20 22:11:05 [notice] 19762#0: start worker processes
2010/12/20 22:11:05 [notice] 19762#0: start worker process 19763
2010/12/20 22:11:05 [notice] 19762#0: start worker process 19764
2010/12/20 22:11:05 [notice] 19762#0: start worker process 19765
2010/12/20 22:11:05 [notice] 19762#0: start worker process 19766
2010/12/20 22:11:05 [notice] 19762#0: start worker process 19767
2010/12/20 22:11:05 [notice] 19762#0: start worker process 19768
2010/12/20 22:11:05 [notice] 19762#0: start worker process 19769
2010/12/20 22:11:05 [notice] 19762#0: start worker process 19770
2010/12/20 22:11:05 [notice] 19762#0: start cache manager process 19771
2010/12/20 22:11:05 [notice] 19762#0: start cache loader process 19772
2010/12/20 22:11:05 [notice] 19762#0: signal 23 (SIGIO) received
2010/12/20 22:11:05 [notice] 19762#0: signal 23 (SIGIO) received
2010/12/20 22:11:05 [notice] 19762#0: signal 23 (SIGIO) received
2010/12/20 22:11:05 [notice] 19762#0: signal 23 (SIGIO) received
2010/12/20 22:11:05 [notice] 19762#0: signal 23 (SIGIO) received
2010/12/20 22:11:05 [notice] 19762#0: signal 23 (SIGIO) received
2010/12/20 22:11:05 [notice] 19762#0: signal 23 (SIGIO) received
2010/12/20 22:11:05 [notice] 19762#0: signal 23 (SIGIO) received
2010/12/20 22:11:05 [notice] 19762#0: signal 23 (SIGIO) received
2010/12/20 22:11:05 [notice] 19762#0: signal 23 (SIGIO) received
2010/12/20 22:11:05 [notice] 19762#0: signal 23 (SIGIO) received
2010/12/20 22:11:05 [notice] 19762#0: signal 23 (SIGIO) received
2010/12/20 22:12:05 [notice] 19772#0: http file cache: /home/www/cache 0.000M, bsize: 2048
2010/12/20 22:12:05 [notice] 19762#0: signal 20 (SIGCHLD) received
2010/12/20 22:12:05 [notice] 19762#0: cache loader process 19772 exited with code 0
2010/12/20 22:12:05 [not ice] 19762#0: signal 23 (SIGIO) received
2010/12/20 22:12:05 [notice] 19762#0: signal 23 (SIGIO) received




_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.