它看起來像nginx 0.8.35 may support chunked transfer encoding:啓用nginx的塊傳輸編碼
nginx的變化0.8.35 2010年4月1日
*) Change: now the charset filter runs before the SSI filter. *) Feature: the "chunked_transfer_encoding" directive.
這是偉大的,因爲我想獲得推混帳通過nginx反向代理更改爲git-http-backend進程。 Git HTTP利用分塊傳輸編碼for client-side efficiency reasons。
但是,我無法讓它工作。我使用nginx的0.8.44。在Debian Lenny具有以下配置調用:
./configure \
--sbin-path=/usr/sbin \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--user=www-data \
--group=www-data \
--pid-path=/var/run/nginx.pid \
--lock-path=/var/lock/nginx.lock \
--with-http_ssl_module \
--with-http_gzip_static_module \
--with-http_realip_module
而下面的conf文件:
server {
server_name example.com;
location/{
proxy_pass http://192.168.0.10;
include /etc/nginx/proxy.conf;
chunked_transfer_encoding on;
}
}
而且我proxy.conf
看起來是這樣的:
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 100M;
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;