проблемы с кэшированием, версия 0.8.54
Александр Рочев
foxr на mail.ru
Пн Дек 20 22:54:12 MSK 2010
При работе с энджин икс столкнулся с проблемой кеширования.Суть в том, что не происходит запись закешированных файлов в определенную папку.
До принятия решения о кешировании все модули и параметры были всегда внимательно прочитаны на вашем сайте и проблем никогда не возникало, но в данной ситуации не получается так же просто как и раньше.
Система 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)$ {
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 [notice] 19762#0: signal 23 (SIGIO) received
2010/12/20 22:12:05 [notice] 19762#0: signal 23 (SIGIO) received
----------- следущая часть -----------
Вложение в формате HTML было извлечено…
URL: <http://nginx.org/pipermail/nginx-ru/attachments/20101220/4aa77b53/attachment-0001.html>
Подробная информация о списке рассылки nginx-ru