December 01, 2012 07:48AM
Добрый день.

Я схожу с ума )

Простейшая конфига (openvz). Но в каталоге кеша ничего нет, все проксируется. Посмотри плз, где я туплю. error.log пустой на предмет ошибок.

2012/12/01 16:26:34 [notice] 3194#0: using the "epoll" event method
2012/12/01 16:26:34 [notice] 3194#0: nginx/1.2.5
2012/12/01 16:26:34 [notice] 3194#0: OS: Linux 2.6.32-16-pve
2012/12/01 16:26:34 [notice] 3194#0: getrlimit(RLIMIT_NOFILE): 1024:1024
2012/12/01 16:26:34 [notice] 3195#0: start worker processes
2012/12/01 16:26:34 [notice] 3195#0: start worker process 3196
2012/12/01 16:26:34 [notice] 3195#0: start worker process 3197
2012/12/01 16:26:34 [notice] 3195#0: start cache manager process 3198
2012/12/01 16:26:34 [notice] 3195#0: start cache loader process 3200
2012/12/01 16:27:34 [notice] 3200#0: http file cache: /var/spool/nginx/cache 0.000M, bsize: 4096
2012/12/01 16:27:34 [notice] 3195#0: signal 17 (SIGCHLD) received
2012/12/01 16:27:34 [notice] 3195#0: cache loader process 3200 exited with code 0


nginx.conf

user nginx;
worker_processes 2;
worker_rlimit_nofile 16384;
timer_resolution 100ms;
worker_priority -5;

error_log /var/log/nginx/error.log debug;

pid /var/run/nginx.pid;

events {
worker_connections 2048;
# multi_accept on;
}

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

log_format main '$time_local $remote_addr [$request_time] $request'
'"$status" $body_bytes_sent "$http_referer" '
'"$http_user_agent"';
#access_log off;
#access_log /var/log/nginx/access.log main buffer=32k;
access_log /var/log/nginx/access.log main;
proxy_cache_path /var/spool/nginx/cache levels=1:2 keys_zone=one:64m inactive=7d max_size=2000m;

server {
listen 0.0.0.0; # IPort
server_name *.site.ru
charset windows-1251;
location / {
proxy_pass http://192.168.7.175;

proxy_cache one;
proxy_cache_valid 200 302 7d;
proxy_cache_valid 304 7d;
proxy_cache_min_uses 1;
proxy_ignore_headers Expires Set-Cookie;

proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
}
Subject Author Posted

nginx не кеширует в простейшей конфигурации ( посмотри плз

cilrill December 01, 2012 07:48AM

Re: nginx не кеширует в простейшей конфигурации ( посмотри плз

cilrill December 02, 2012 10:07AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 185
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready