location - файлы и бэкэнд

Eugene Fominykh worrks at gmail.com
Fri May 30 08:49:28 MSD 2008


Вот два куска дебаг-лога - один с if ( $request_method = "POST" ), другой - без

Это с:
2008/05/30 07:30:59 [debug] 24269#0: *5 http cleanup add: 2841BCDC
2008/05/30 07:30:59 [debug] 24269#0: *5 get rr peer, try: 1
2008/05/30 07:30:59 [debug] 24269#0: *5 socket 12
2008/05/30 07:30:59 [debug] 24269#0: *5 connect to 192.168.1.45:8008, fd:12 #6
2008/05/30 07:30:59 [debug] 24269#0: *5 kevent set event: 12: ft:-1 fl:0025
2008/05/30 07:30:59 [debug] 24269#0: *5 connected
2008/05/30 07:30:59 [debug] 24269#0: *5 http upstream connect: 0
2008/05/30 07:30:59 [debug] 24269#0: *5 http upstream send request
2008/05/30 07:30:59 [debug] 24269#0: *5 chain writer buf fl:0 s:701
2008/05/30 07:30:59 [debug] 24269#0: *5 chain writer buf fl:1 s:56
2008/05/30 07:30:59 [debug] 24269#0: *5 chain writer in: 2841BD08
2008/05/30 07:30:59 [debug] 24269#0: *5 writev: 757 of 757
2008/05/30 07:30:59 [debug] 24269#0: *5 chain writer out: 00000000
2008/05/30 07:30:59 [debug] 24269#0: *5 event timer add: 12: 30000:941112429
2008/05/30 07:30:59 [debug] 24269#0: *5 post event 28D00078
2008/05/30 07:30:59 [debug] 24269#0: *5 delete posted event 28D00078
2008/05/30 07:30:59 [debug] 24269#0: *5 http request empty handler
2008/05/30 07:30:59 [debug] 24269#0: *5 post event 28A000F0
2008/05/30 07:30:59 [debug] 24269#0: *5 delete posted event 28A000F0
2008/05/30 07:30:59 [debug] 24269#0: *5 http upstream process header
2008/05/30 07:30:59 [debug] 24269#0: *5 malloc: 2842A000:4096
2008/05/30 07:30:59 [debug] 24269#0: *5 recv: eof:0, avail:4096, err:0
2008/05/30 07:30:59 [debug] 24269#0: *5 recv: fd:12 4096 of 4096
2008/05/30 07:30:59 [debug] 24269#0: *5 http proxy status 200 "200 OK"
Тут дальше идут хидеры


Это без:
2008/05/30 07:43:18 [debug] 24330#0: *5 http cleanup add: 2841BB8C
2008/05/30 07:43:18 [debug] 24330#0: *5 get rr peer, try: 1
2008/05/30 07:43:18 [debug] 24330#0: *5 socket 12
2008/05/30 07:43:18 [debug] 24330#0: *5 connect to 192.168.1.45:8008, fd:12 #6
2008/05/30 07:43:18 [debug] 24330#0: *5 kevent set event: 12: ft:-1 fl:0025
2008/05/30 07:43:18 [debug] 24330#0: *5 connected
2008/05/30 07:43:18 [debug] 24330#0: *5 http upstream connect: 0
2008/05/30 07:43:18 [debug] 24330#0: *5 http upstream send request
2008/05/30 07:43:18 [debug] 24330#0: *5 chain writer buf fl:1 s:701
2008/05/30 07:43:18 [debug] 24330#0: *5 chain writer in: 2841BBA8
2008/05/30 07:43:18 [debug] 24330#0: *5 writev: 701 of 701
2008/05/30 07:43:18 [debug] 24330#0: *5 chain writer out: 00000000
2008/05/30 07:43:18 [debug] 24330#0: *5 event timer add: 12: 30000:941851428
2008/05/30 07:43:18 [debug] 24330#0: *5 post event 28D00078
2008/05/30 07:43:18 [debug] 24330#0: *5 delete posted event 28D00078
2008/05/30 07:43:18 [debug] 24330#0: *5 http request empty handler
2008/05/30 07:43:19 [debug] 24330#0: *5 post event 28A00078
2008/05/30 07:43:19 [debug] 24330#0: *5 delete posted event 28A00078
2008/05/30 07:43:19 [debug] 24330#0: *5 http read discarded body
2008/05/30 07:43:19 [debug] 24330#0: *5 recv: eof:0, avail:56, err:0
2008/05/30 07:43:19 [debug] 24330#0: *5 recv: fd:8 56 of 56
2008/05/30 07:43:26 [debug] 24330#0: *3 event timer del: 9: 941829436
2008/05/30 07:43:26 [debug] 24330#0: *3 http keepalive handler
2008/05/30 07:43:26 [debug] 24330#0: *3 close http connection: 9
2008/05/30 07:43:26 [debug] 24330#0: *3 free: 00000000
2008/05/30 07:43:26 [debug] 24330#0: *3 free: 00000000
2008/05/30 07:43:26 [debug] 24330#0: *3 free: 28448200, unused: 64
2008/05/30 07:43:48 [debug] 24330#0: *5 event timer del: 12: 941851428
2008/05/30 07:43:48 [debug] 24330#0: *5 http upstream process header
2008/05/30 07:43:48 [debug] 24330#0: *5 http next upstream, 4
2008/05/30 07:43:48 [debug] 24330#0: *5 free rr peer 1 4
2008/05/30 07:43:48 [error] 24330#0: *5 upstream timed out (60: Operation timed out) while reading response header from upstream
и тут вылетаем по таймауту

proforg пишет:

> А что пишет в debug log'е про этот запрос ?
> 
> У меня до 0.7.0 включительно нормально работает
> 
> location / {
>      if ( $request_method = "POST" ) { rewrite / /index.php last; }
> }
> 
> Ещё по идее должно работать
>     rewrite / @backend
> 
> в 0.7.1 правда у меня не работает ни то ни то:)
> 
> В твоём же случае как я понимаю даже без  if ($request_method = POST ) {
> POST запрос уйдёт на @backend - так как для / будет 405.
> 
> 
> On 29.05.2008, at 9:51, Eugene Fominykh wrote:
> 
>> У меня теперь не передается POST на backend - отваливается по таймауту.
>> А вот так работает.
>>
>>        location / {
>>           if ($request_method = POST ) {
>>               proxy_pass http://xxx.xxx.xxx.xxx:8008;
>>           }
>>            root /sites/$host/;
>>            expires 48h;
>>            error_page 403 404 405 = @backend;
>>        }
>>
>> Может тут есть другой выход?
>>
>>
>>







More information about the nginx-ru mailing list