Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Проблемы с кешированием
- To: nginx-ru@xxxxxxxxx
- Subject: Проблемы с кешированием
- From: "yuri37" <nginx-forum@xxxxxxxx>
- Date: Fri, 10 Feb 2012 01:52:32 -0500
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mickey.jlkhosting.com; s=x; h=Date:Sender:From:Message-ID:Content-Transfer-Encoding:Content-Type:Subject:To; bh=v+HN5/x/hSM6w31mXqIDW3aqW92FGEicE+xhYnpxO7M=; b=gzm7kZ+CLNJrRdSAmBZ8DY0rtQksnxn/ssFjLrWqv4qSKvvGoknG1Iv8fqn4eTxLuzqXvKGMmkM2kfwe9z7c3ADSCUhtP+UwU0AAhsNVj73tcp5ecgYrhRqw10i0VpzT;
Здравствуйте. Прошу помочь с такой
проблемой. Файлы в кеш пишутся, а на
сайте как-будто нет этого кеширования.
Сервер:
Debian
Апач+nginx
Сайт рабтает в режиме Fcgi
Конфиг Nginx
user www-data;
worker_processes 2;
worker_rlimit_nofile 8192;
timer_resolution 100ms;
worker_priority -5;
pid /var/run/nginx.pid;
events {
worker_connections 2048;
# multi_accept on;
use epoll;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json
application/x-javascript text/xml application/xml application/xml+rss
text/javascript;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
client_max_body_size 16m;
log_format isp '$bytes_sent $request_length';
proxy_cache_path /var/cache/nginx levels=1:2
keys_zone=fastcgi_cache:128m max_size=256m inactive=60m;
server {
listen *.*.*.*:80;
server_name autoturn.ru www.autoturn.ru;
rewrite ^(/manager/.*)$ https://$host$1 permanent;
error_page 404 = @fallback;
location ~* ^/(webstat/|awstats|webmail/|myadmin/|manimg/) {
proxy_pass http://*.*.*.*:8080;
proxy_redirect http://*.ru:8080/ /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ \.(php|html)$ {
proxy_pass http://*.*.*.*:8080;
proxy_cache fastcgi_cache;
proxy_cache_key $host$uri?$args;
proxy_no_cache $cookie_AuthUser;
proxy_cache_bypass $cookie_AuthUser;
proxy_cache_valid 200 301 302 304 1h;
#proxy_cache_key
"$request_method|$http_if_modified_since|$http_if_none_match|$host|$request_uri";
proxy_cache_use_stale updating error timeout invalid_header http_500
http_502 http_503 http_504 http_404;
proxy_hide_header "Set-Cookie";
proxy_ignore_headers "Cache-Control" "Expires";
}
location ~* ^/(administrator/|admin/) {
proxy_pass http://*.*.*.*:8080;
proxy_redirect http://*.ru:8080/ /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
location / {
proxy_pass http://*.*.*.*:8080;
proxy_redirect http://*.ru:8080/ /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
пробываел в location / переносить из location ~
\.(php|html)$ - ничего. Оч.прошу помочь.
Posted at Nginx Forum:
http://forum.nginx.org/read.php?21,222203,222203#msg-222203
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru
|