x-accel-redirect + apache

Ivan Albetkov ivan_alb at agava.com
Mon Jul 4 15:02:01 MSD 2005


Добрый день!

Имеется такая конфигурация:
перед апачем (1.3.33) стоит nginx 0.1.37 и все проксирует на апач.
К апачу приделан модуль, который на всю статику вставляет в хидеры
строку "X-Accel-Redirect: /nginx_internal/home/$r->filename", выдает
хидеры и говорит апачу "OK".

У nginx'а в конфиге сделано так:
location /nginx_internal/home/ {
 internal;
 alias /home/;
}

Проблема:
при загрузке картинок (например, .gif) в IE через раз они открываются
как 'text/plain'.

В access-логе такие "выдачи" отличаются тем, что у них статус 200 (у
нормальных - 304):

213.152.157.43 - - [04/Jul/2005:14:50:10 +0400] "GET
/images/topics/kras.gif HTTP/1.1" 304 3417 "-" "Mozilla/4.0 (compatible;
MSIE 5.01; Windows NT 5.0)"
213.152.157.43 - - [04/Jul/2005:14:50:11 +0400] "GET
/images/topics/kras.gif HTTP/1.1" 304 3417 "-" "Mozilla/4.0 (compatible;
MSIE 5.01; Windows NT 5.0)"
213.152.157.43 - - [04/Jul/2005:14:50:12 +0400] "GET
/images/topics/kras.gif HTTP/1.1" 304 3417 "-" "Mozilla/4.0 (compatible;
MSIE 5.01; Windows NT 5.0)"
213.152.157.43 - - [04/Jul/2005:14:50:12 +0400] "GET
/images/topics/kras.gif HTTP/1.1" 200 3417 "-" "Mozilla/4.0 (compatible;
MSIE 5.01; Windows NT 5.0)"
213.152.157.43 - - [04/Jul/2005:14:50:14 +0400] "GET
/images/topics/kras.gif HTTP/1.1" 200 3417 "-" "Mozilla/4.0 (compatible;
MSIE 5.01; Windows NT 5.0)"
213.152.157.43 - - [04/Jul/2005:14:50:15 +0400] "GET
/images/topics/kras.gif HTTP/1.1" 304 3417 "-" "Mozilla/4.0 (compatible;
MSIE 5.01; Windows NT 5.0)"


В error-логе есть такие строки:

2005/07/04 14:50:12 [info] 15597#0: *34943872 kevent() reported that
client 213.152.157.43 closed keepalive connection (54: Connection reset
by peer)
2005/07/04 14:50:14 [info] 15597#0: *34943957 kevent() reported that
client 213.152.157.43 closed keepalive connection (54: Connection reset
by peer)
2005/07/04 14:50:16 [info] 15597#0: *34944159 kevent() reported that
client 213.152.157.43 closed keepalive connection (54: Connection reset
by peer)
2005/07/04 14:50:16 [info] 15597#0: *34944220 kevent() reported that
client 213.152.157.43 closed keepalive connection (54: Connection reset
by peer)
2005/07/04 14:50:16 [info] 15597#0: *34944227 kevent() reported about an
closed connection (54: Connection reset by peer) while reading client
request line, client: 213.152.157.43, server: cpo1.agava.net
2005/07/04 14:50:16 [info] 15597#0: *34944228 kevent() reported that
client 213.152.157.43 closed keepalive connection (54: Connection reset
by peer)
2005/07/04 14:50:16 [info] 15597#0: *34944235 kevent() reported about an
closed connection (54: Connection reset by peer) while reading client
request line, client: 213.152.157.43, server: cpo1.agava.net
2005/07/04 14:50:16 [info] 15597#0: *34944237 kevent() reported that
client 213.152.157.43 closed keepalive connection (54: Connection reset
by peer)
2005/07/04 14:50:16 [info] 15597#0: *34944240 kevent() reported about an
closed connection (54: Connection reset by peer) while reading client
request line, client: 213.152.157.43, server: cpo1.agava.net
2005/07/04 14:50:16 [info] 15597#0: *34944242 kevent() reported that
client 213.152.157.43 closed keepalive connection (54: Connection reset
by peer)
2005/07/04 14:50:16 [info] 15597#0: *34944245 kevent() reported about an
closed connection (54: Connection reset by peer) while reading client
request line, client: 213.152.157.43, server: cpo1.agava.net
2005/07/04 14:50:16 [info] 15594#0: *34944250 kevent() reported that
client 213.152.157.43 closed keepalive connection (54: Connection reset
by peer)
2005/07/04 14:50:16 [info] 15594#0: *34944254 kevent() reported about an
closed connection (54: Connection reset by peer) while reading client
request line, client: 213.152.157.43, server: cpo1.agava.net
2005/07/04 14:50:16 [info] 15594#0: *34944257 kevent() reported that
client 213.152.157.43 closed keepalive connection (54: Connection reset
by peer)
2005/07/04 14:50:16 [info] 15594#0: *34944264 kevent() reported about an
closed connection (54: Connection reset by peer) while reading client
request line, client: 213.152.157.43, server: cpo1.agava.net
2005/07/04 14:50:16 [info] 15594#0: *34944267 kevent() reported that
client 213.152.157.43 closed keepalive connection (54: Connection reset
by peer)
2005/07/04 14:50:16 [info] 15595#0: *34944269 kevent() reported about an
closed connection (54: Connection reset by peer) while reading client
request line, client: 213.152.157.43, server: cpo1.agava.net
2005/07/04 14:50:16 [info] 15595#0: *34944271 kevent() reported that
client 213.152.157.43 closed keepalive connection (54: Connection reset
by peer)
2005/07/04 14:50:16 [info] 15594#0: *34944279 kevent() reported about an
closed connection (54: Connection reset by peer) while reading client
request line, client: 213.152.157.43, server: cpo1.agava.net
2005/07/04 14:50:16 [info] 15594#0: *34944281 kevent() reported that
client 213.152.157.43 closed keepalive connection (54: Connection reset
by peer)
2005/07/04 14:50:16 [info] 15594#0: *34944288 kevent() reported about an
closed connection (54: Connection reset by peer) while reading client
request line, client: 213.152.157.43, server: cpo1.agava.net
2005/07/04 14:50:16 [info] 15594#0: *34944292 kevent() reported about an
closed connection (54: Connection reset by peer) while reading client
request line, client: 213.152.157.43, server: cpo1.agava.net
2005/07/04 14:50:16 [info] 15594#0: *34944295 kevent() reported that
client closed prematurely connection, so upstream connection is closed
too (54: Connection reset by peer) while sending request to upstream,
client: 213.152.157.43, server: cpo1.agava.net, URL:
"/images/topics/kras.gif", upstream:
http://217.107.212.24:81:/images/topics/kras.gif, host: "kolyan.net"
2005/07/04 14:50:16 [info] 15594#0: *34944298 kevent() reported about an
closed connection (54: Connection reset by peer) while sending response
to client, client: 213.152.157.43, server: cpo1.agava.net, URL:
"/images/topics/kras.gif", host: "kolyan.net"
2005/07/04 14:50:16 [info] 15594#0: *34944300 kevent() reported that
client 213.152.157.43 closed keepalive connection (54: Connection reset
by peer)
2005/07/04 14:50:16 [info] 15594#0: *34944305 kevent() reported about an
closed connection (54: Connection reset by peer) while reading client
request line, client: 213.152.157.43, server: cpo1.agava.net
2005/07/04 14:50:16 [info] 15594#0: *34944306 kevent() reported that
client 213.152.157.43 closed keepalive connection (54: Connection reset
by peer)
2005/07/04 14:50:16 [info] 15594#0: *34944313 kevent() reported about an
closed connection (54: Connection reset by peer) while reading client
request line, client: 213.152.157.43, server: cpo1.agava.net
2005/07/04 14:50:16 [info] 15594#0: *34944316 kevent() reported that
client closed prematurely connection, so upstream connection is closed
too (54: Connection reset by peer) while sending request to upstream,
client: 213.152.157.43, server: cpo1.agava.net, URL:
"/images/topics/kras.gif", upstream:
http://217.107.212.24:81:/images/topics/kras.gif, host: "kolyan.net"
2005/07/04 14:50:16 [info] 15594#0: *34944318 kevent() reported that
client 213.152.157.43 closed keepalive connection (54: Connection reset
by peer)
2005/07/04 14:50:16 [info] 15594#0: *34944323 kevent() reported about an
closed connection (54: Connection reset by peer) while reading client
request line, client: 213.152.157.43, server: cpo1.agava.net
2005/07/04 14:50:16 [info] 15594#0: *34944326 kevent() reported about an
closed connection (54: Connection reset by peer) while reading client
request line, client: 213.152.157.43, server: cpo1.agava.net
2005/07/04 14:50:16 [info] 15594#0: *34944327 kevent() reported that
client 213.152.157.43 closed keepalive connection (54: Connection reset
by peer)

Как быть?


Заранее благодарен,

-- 
Ivan Albetkov
AGAVA Software (http://www.agava.com)






More information about the nginx-ru mailing list