let's build nginx server with caching !?

Dmitry Sherman lists at ruby-forum.com
Wed Dec 26 14:58:22 MSK 2007


Changliang Chen wrote:
> Try  disabling the ngx_http_flv_module or the proxy_buffering ��
> 
> 2007/12/24, Dmitry Sherman <lists at ruby-forum.com>:

Hi,
when i disabled the proxy_buffering it stopped the local download of the 
cache totally. and the proxy temp dir was also empty.
Here is my configuration file:

bash-2.05b# cat nginx.conf
#user  nobody;
worker_processes  1;

error_log  logs/error.log;
pid        logs/nginx.pid;
events {
# 2048 old
  worker_connections  2048;
#  use rtsig;
}
http {
  include       mime.types;
  default_type  application/octet-stream;
#    default_type  video/x-flv;
  access_log off;
  sendfile on;
  tcp_nopush on;
  tcp_nodelay on;
 # keepalive_timeout 65;
#  connection_pool_size 2k;
#  request_pool_size 4k;
#  output_buffers 10 128k;
  #gzip  on;
server {
        listen       82.166.13.202:80;
        server_name  jugy.com www.jugy.com;

#        access_log  logs/host.access.log  main;

        # Main location
        location / {
            proxy_pass         http://84.94.232.33:80/;
            proxy_redirect off;
            proxy_set_header   Host             $host;
            proxy_set_header   X-Real-IP        $remote_addr;
            proxy_set_header   X-Forwarded-For 
$proxy_add_x_forwarded_for;

            client_max_body_size       10m;
            client_body_buffer_size    128k;

            proxy_connect_timeout      90;
            proxy_send_timeout         90;
            proxy_read_timeout         90;

            proxy_buffer_size          4k;
            proxy_buffers              4 32k;
            proxy_busy_buffers_size    64k;
            proxy_temp_file_write_size 64k;
        }

location /flvideo/ {
    root                 /usr/local/nginx/data/www;
open_file_cache_errors  off;
    error_page              404 = /fetch$uri;

}
location /images/ {
    root                 /usr/local/nginx/data/www;
open_file_cache_errors  off;
    error_page              404 = /fetch$uri;

}
location /thumb/ {
    root                 /usr/local/nginx/data/www;
open_file_cache_errors  off;
    error_page              404 = /fetch$uri;

}
location /fetch/ {
        internal;
        proxy_pass         http://84.94.232.33:80/;
        proxy_store             on;
#       proxy_buffering off;
        proxy_temp_path         /usr/local/nginx/data/temp;
        alias /usr/local/nginx/data/www/;
        }

}
}
-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list