26 марта 2012 г. 16:59 пользователь InventOR <nginx-forum@nginx.us> написал:
> захотелось снять файловый IO с рабочего
> проекта прикрутив внешний сервер
> кеширующий и раздающий статику.
> но одна беда - поломался вывод mp4 видео.
> картинки, js, css кеширует, flv не кеширует,
> но проксирует. mp4 не кеширует и не
> проксирует.
> ткните куда копать в логах пусто.
>
> http {
> proxy_cache_path /var/tmp/nginx/storage/none levels=1:2
> keys_zone=STNONE:10m inactive=30d max_size=20000m;
> proxy_cache_key $scheme$proxy_host$uri$is_args$args;
> upstream apache_none {
> server 1.2.3.5:80; #production web server
> }
> }
>
> server {
> listen 1.2.3.4:80;
> server_name static.none.pro;
>
> client_max_body_size 50m;
>
> location / {
> root /var/tmp/nginx/storage/none;
> open_file_cache_errors off;
> location ~ \.(mp4|m4v|m4a)$ {
> mp4;
где здесь написано про кеширование?
> }
> location ~ \.flv$ {
> flv;
где здесь написано про кеширование?
> }
> try_files $uri @hotcache;
В @hotcache уйдет все остальное....
> }
>
> location @hotcache {
> internal;
> expires 1d;
> open_file_cache_errors off;
> try_files $uri @storage;
> root /var/tmp/nginx/hotcache/none; # memory cache
> disk 4Gb
> }
>
> location @storage {
> internal;
> expires 30d;
> proxy_intercept_errors on;
> proxy_cache STNONE;
> proxy_cache_min_uses 1;
> proxy_cache_valid 404 502 503 10m;
> proxy_cache_valid 200 301 302 304 30d;
> proxy_cache_valid any 30d;
> proxy_ignore_client_abort on;
> proxy_ignore_headers "Cache-Control" "Expires";
> proxy_hide_header "X-Powered-By";
> proxy_temp_path /var/tmp/nginx/tmp;
> proxy_cache_use_stale updating;
> proxy_pass http://apache_none;
> proxy_set_header Host $host;
> proxy_set_header X-Real-IP $remote_addr;
> proxy_set_header X-Forwarded-For
> $proxy_add_x_forwarded_for;
> proxy_connect_timeout 90;
> proxy_send_timeout 90;
> proxy_read_timeout 90;
> proxy_set_header Range "";
> }
> location ~ /\.ht {
> deny all;
> }
> }
>
> nginx version: nginx/1.0.14
> TLS SNI support enabled
> configure arguments: --with-http_addition_module --with-http_flv_module
> --with-http_geoip_module --with-http_gzip_static_module
> --with-http_image_filter_module --with-http_mp4_module
> --with-http_realip_module
> --add-module=/var/ports/basejail/usr/ports/www/nginx/work/ngx_http_subs_filter_module-0.5.2.r53
> --with-http_ssl_module --with-http_stub_status_module --with-pcre
> --add-module=/var/ports/basejail/usr/ports/www/nginx/work/agentzh-xss-nginx-module-57e2119
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?21,224417,224417#msg-224417
>
> _______________________________________________
> nginx-ru mailing list
> nginx-ru@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-ru
_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru