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: "BinLaden" <nginx-forum@xxxxxxxx>
- Date: Thu, 15 Sep 2011 06:16:21 -0400
- 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=KWCathES2GCv4AqEfnCNACAy6by4Hxs6xLBXkAQ85DI=; b=UF/tW5Lr2EQmA6ueadzTUeInUSueH+44Qw/PBy3fomTikc4uhc176lhsoM5ckZ4rHMolzU92GURe5MlLDRtnyxf08e2AdfNpcKYz+m8clRotoaemuTJmaXDETy7W8NRx;
http {
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'"$status/$upstream_status" $body_bytes_sent ' '"$host"
"$upstream_addr/$upstream_response_time"';
access_log logs/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65 20;
client_header_timeout 3m;
client_body_timeout 3m;
send_timeout 3m;
client_header_buffer_size 4k;
large_client_header_buffers 4 4k;
client_max_body_size 1m;
client_body_buffer_size 128k;
output_buffers 4 32k;
postpone_output 1460;
proxy_connect_timeout 100ms;
proxy_send_timeout 5;
proxy_read_timeout 5;
#proxy_buffering off;
proxy_buffer_size 128k;
proxy_buffers 4 128k;
proxy_busy_buffers_size 128k;
proxy_temp_file_write_size 128k;
gzip off;
#proxy_cache_key "$scheme://$host$uri$is_args$args:";
proxy_cache_key "$scheme://$request_method$host$request_uri:";
proxy_cache_path /var/cache/nginx/ levels=1:2 keys_zone=one:10m
inactive=20m max_size=500m;
fastcgi_cache_path /var/cache/nginx/ levels=1:2
keys_zone=fastcgi_cache:16m max_size=256m inactive=1d;
proxy_cache one;
proxy_cache_methods POST GET HEAD;
proxy_cache_min_uses 1;
#proxy_cache_valid 200 302 5m;
#proxy_cache_valid 301 1h;
proxy_cache_valid any 15m;
proxy_cache_use_stale error timeout invalid_header http_500 http_502
http_503 http_504;
proxy_ignore_headers X-Accel-Redirect X-Accel-Expires Expires
Cache-Control;
#proxy_ignore_headers Cache-Control Expires;
set_real_ip_from 127.0.0.1;
real_ip_header X-Forwarded-For;
server {
listen yy.yy.yy.yy;
server_name domain.ru *domain.ru;
location ~*
host.domain.ru/(<?ID>[^/]+)/(<?NAME>.*)\.(bmp|gif|jpg|jpeg|png|swf|tiff|swf|flv)
{
proxy_cache off;
}
location / {
proxy_pass http://xx.xx.xx.xx;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
Приветствую, коллеги.
Который день мучаемся с проблемой :
Есть domain.ru - который нужно кэшировать
отдельно от него живет host.domain.ru - на нем
живет статика для domain.ru, ее кэшировать
не надо.
А она упорно кэшируется.
1. if ($host ~* ^host.domain.ru$) {
break; }
2. if request_uri аналогично 1.
3. location ~*
host.domain.ru.ru/(<?ID>[^/]+)/(<?NAME>.*)\.(bmp|gif|jpg|jpeg) {
proxy_cache off; }
не помогает
Есть идеи?
Posted at Nginx Forum:
http://forum.nginx.org/read.php?21,215247,215247#msg-215247
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru
|