ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: proxy_intercept_errors



On Mon, Sep 04, 2006 at 08:42:36AM +0400, Igor Sysoev wrote:
> On Mon, 4 Sep 2006, Alexander S. Zavdoveyeff wrote:
> 
> >А сабжевая директива работать в 0.4.0 перестала?
> 
> Нет.

[user[p2]@first]:[9:01]#pkg_info | grep nginx
nginx-0.4.0         Robust and small WWW server

[user[p2]@first]:[9:02]#uname -srm
FreeBSD 6.1-RELEASE-p3 i386

Конфигурация виртуального сервера:
server {
    listen       217.20.163.231:80;
    server_name  main.net.ua www.main.net.ua;
    access_log  /home/logs/nginx/main.net.ua-access  main;
    error_log /home/logs/nginx/main.net.ua-err debug;

    location / {
        proxy_pass         http://127.0.0.1:80/;
        proxy_redirect     off;
        proxy_intercept_errors on;

        proxy_set_header   Host             $host;
        proxy_set_header   X-Real-IP        $remote_addr;
        proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
    }

    valid_referers   none  blocked main.net.ua www.main.net.ua;
    if ($invalid_referer) {
        return   403;
    }

    location ~*
^.+\.(jpg|jpeg|gif|png|swf|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|bin|iso|txt|tar|mp3|avi|wav|bmp|rtf|js
)$ {
        root   /home/main_acc/main.net.ua;
    }

   location ~ /\.ht {
        deny all;
    }
}

На бэк-энде апач. В конфигурацию http включены также:
recursive_error_pages off;

Дебаг-лог в аттачменте.

-- 
          PHN85-UANIC                    PHN85-RIPE
WBR, Alexander S. Zavdoveyeff.           mailto: a.zavdoveyev@xxxxxxxxxxx
2006/09/04 09:06:32 [debug] 48679#0: *247 post event 0813A0F0
2006/09/04 09:06:32 [debug] 48679#0: *247 delete posted event 0813A0F0
2006/09/04 09:06:32 [debug] 48679#0: *247 http keepalive handler
2006/09/04 09:06:32 [debug] 48679#0: *247 malloc: 080B7000:1024
2006/09/04 09:06:32 [debug] 48679#0: *247 recv: eof:0, avail:466, err:0
2006/09/04 09:06:32 [debug] 48679#0: *247 recv: fd:13 466 of 1024
2006/09/04 09:06:32 [debug] 48679#0: *247 malloc: 080BB000:648
2006/09/04 09:06:32 [debug] 48679#0: *247 malloc: 080C2000:4096
2006/09/04 09:06:32 [debug] 48679#0: *247 http process request line
2006/09/04 09:06:32 [debug] 48679#0: *247 http request line: "GET / HTTP/1.1"
2006/09/04 09:06:32 [debug] 48679#0: *247 http uri: "/"
2006/09/04 09:06:32 [debug] 48679#0: *247 http args: ""
2006/09/04 09:06:32 [debug] 48679#0: *247 http exten: ""
2006/09/04 09:06:32 [debug] 48679#0: *247 http process request header line
2006/09/04 09:06:32 [debug] 48679#0: *247 http header: "Host: main.net.ua"
2006/09/04 09:06:32 [debug] 48679#0: *247 http header: "User-Agent: Mozilla/5.0 
(Windows; U; Windows NT 5.0; ru; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6"
2006/09/04 09:06:32 [debug] 48679#0: *247 http header: "Accept: 
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5"
2006/09/04 09:06:32 [debug] 48679#0: *247 http header: "Accept-Language: 
ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3"
2006/09/04 09:06:32 [debug] 48679#0: *247 http header: "Accept-Encoding: 
gzip,deflate"
2006/09/04 09:06:32 [debug] 48679#0: *247 http header: "Accept-Charset: 
windows-1251,utf-8;q=0.7,*;q=0.7"
2006/09/04 09:06:32 [debug] 48679#0: *247 http header: "Keep-Alive: 300"
2006/09/04 09:06:32 [debug] 48679#0: *247 http header: "Connection: keep-alive"
2006/09/04 09:06:32 [debug] 48679#0: *247 http header: "Pragma: no-cache"
2006/09/04 09:06:32 [debug] 48679#0: *247 http header: "Cache-Control: no-cache"
2006/09/04 09:06:32 [debug] 48679#0: *247 http header done
2006/09/04 09:06:32 [debug] 48679#0: *247 event timer del: 13: 2003826701
2006/09/04 09:06:32 [debug] 48679#0: *247 generic phase: 0
2006/09/04 09:06:32 [debug] 48679#0: *247 http script var
2006/09/04 09:06:32 [debug] 48679#0: *247 http script var: ""
2006/09/04 09:06:32 [debug] 48679#0: *247 http script if
2006/09/04 09:06:32 [debug] 48679#0: *247 http script if: false
2006/09/04 09:06:32 [debug] 48679#0: *247 find location for "/"
2006/09/04 09:06:32 [debug] 48679#0: *247 find location: "/"
2006/09/04 09:06:32 [debug] 48679#0: *247 find location: "/MHM/"
2006/09/04 09:06:32 [debug] 48679#0: *247 find location: ~ 
"^.+\.(jpg|jpeg|gif|png|swf|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|bin|iso|txt|tar|mp3|avi|wav|bmp|rtf|js)$"
2006/09/04 09:06:32 [debug] 48679#0: *247 find location: ~ "/\.ht"
2006/09/04 09:06:32 [debug] 48679#0: *247 using configuration "/"
2006/09/04 09:06:32 [debug] 48679#0: *247 http cl:-1 max:1048576
2006/09/04 09:06:32 [debug] 48679#0: *247 generic phase: 2
2006/09/04 09:06:32 [debug] 48679#0: *247 post rewrite phase: 3
2006/09/04 09:06:32 [debug] 48679#0: *247 access phase: 4
2006/09/04 09:06:32 [debug] 48679#0: *247 access phase: 5
2006/09/04 09:06:32 [debug] 48679#0: *247 post access phase: 6
2006/09/04 09:06:32 [debug] 48679#0: *247 http init upstream, client timer: 0
2006/09/04 09:06:32 [debug] 48679#0: *247 http proxy header: "User-Agent: 
Mozilla/5.0 (Windows; U; Windows NT 5.0; ru; rv:1.8.0.6) Gecko/20060728 
Firefox/1.5.0.6"
2006/09/04 09:06:32 [debug] 48679#0: *247 http proxy header: "Accept: 
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5"
2006/09/04 09:06:32 [debug] 48679#0: *247 http proxy header: "Accept-Language: 
ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3"
2006/09/04 09:06:32 [debug] 48679#0: *247 http proxy header: "Accept-Encoding: 
gzip,deflate"
2006/09/04 09:06:32 [debug] 48679#0: *247 http proxy header: "Accept-Charset: 
windows-1251,utf-8;q=0.7,*;q=0.7"
2006/09/04 09:06:32 [debug] 48679#0: *247 http proxy header: "Pragma: no-cache"
2006/09/04 09:06:32 [debug] 48679#0: *247 http proxy header: "Cache-Control: 
no-cache"
2006/09/04 09:06:32 [debug] 48679#0: *247 http proxy header:
"GET / HTTP/1.0
Host: main.net.ua
X-Real-IP: 192.168.2.2
X-Forwarded-For: 192.168.2.2
Connection: close
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; ru; rv:1.8.0.6) 
Gecko/20060728 Firefox/1.5.0.6
Accept: 
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7
Pragma: no-cache
Cache-Control: no-cache

"
2006/09/04 09:06:32 [debug] 48679#0: *247 http cleanup add: 080C2A2C
2006/09/04 09:06:32 [debug] 48679#0: *247 socket 14
2006/09/04 09:06:32 [debug] 48679#0: *247 connect to 127.0.0.1:80, fd:14 #254
2006/09/04 09:06:32 [debug] 48679#0: *247 kevent set event: 14: ft:-1 fl:0025
2006/09/04 09:06:32 [debug] 48679#0: *247 kevent set event: 14: ft:-2 fl:0025
2006/09/04 09:06:32 [debug] 48679#0: *247 http upstream connect: -2
2006/09/04 09:06:32 [debug] 48679#0: *247 event timer add: 14: 60000:2003849557
2006/09/04 09:06:32 [debug] 48679#0: *247 post event 0815812C
2006/09/04 09:06:32 [debug] 48679#0: *247 delete posted event 0815812C
2006/09/04 09:06:32 [debug] 48679#0: *247 http upstream send request handler
2006/09/04 09:06:32 [debug] 48679#0: *247 http upstream send request
2006/09/04 09:06:32 [debug] 48679#0: *247 chain writer buf size: 498
2006/09/04 09:06:32 [debug] 48679#0: *247 chain writer in: 080C2A38
2006/09/04 09:06:32 [debug] 48679#0: *247 writev: 498 of 498
2006/09/04 09:06:32 [debug] 48679#0: *247 chain writer out: 00000000
2006/09/04 09:06:32 [debug] 48679#0: *247 event timer del: 14: 2003849557
2006/09/04 09:06:32 [debug] 48679#0: *247 event timer add: 14: 60000:2003849557
2006/09/04 09:06:32 [debug] 48679#0: *247 post event 0815812C
2006/09/04 09:06:32 [debug] 48679#0: *247 delete posted event 0815812C
2006/09/04 09:06:32 [debug] 48679#0: *247 http upstream dummy handler
2006/09/04 09:06:32 [debug] 48679#0: *247 post event 0813A12C
2006/09/04 09:06:32 [debug] 48679#0: *247 delete posted event 0813A12C
2006/09/04 09:06:32 [debug] 48679#0: *247 http upstream process header
2006/09/04 09:06:32 [debug] 48679#0: *247 malloc: 080F6000:4096
2006/09/04 09:06:32 [debug] 48679#0: *247 recv: eof:0, avail:472, err:0
2006/09/04 09:06:32 [debug] 48679#0: *247 recv: fd:14 472 of 4096
2006/09/04 09:06:32 [debug] 48679#0: *247 http proxy status 0 "404 Not Found"
2006/09/04 09:06:32 [debug] 48679#0: *247 http proxy header: "Date: Mon, 04 Sep 
2006 06:06:32 GMT"
2006/09/04 09:06:32 [debug] 48679#0: *247 http proxy header: "Server: 
Apache/1.3.37 (Unix) PHP/5.1.4"
2006/09/04 09:06:32 [debug] 48679#0: *247 http proxy header: "Connection: close"
2006/09/04 09:06:32 [debug] 48679#0: *247 http proxy header: "Content-Type: 
text/html; charset=iso-8859-1"
2006/09/04 09:06:32 [debug] 48679#0: *247 http proxy header done
2006/09/04 09:06:32 [debug] 48679#0: *247 HTTP/1.1 404 Not Found
Server: nginx/0.4.0
Date: Mon, 04 Sep 2006 06:06:32 GMT
Content-Type: text/html; charset=iso-8859-1
Transfer-Encoding: chunked
Connection: keep-alive


2006/09/04 09:06:32 [debug] 48679#0: *247 write new buf t:1 f:0 080C2BF0, pos 
080C2BF0, size: 181 file: 0, size: 0
2006/09/04 09:06:32 [debug] 48679#0: *247 http write filter: l:0 f:0 s:181
2006/09/04 09:06:32 [debug] 48679#0: *247 http upstream process upstream
2006/09/04 09:06:32 [debug] 48679#0: *247 pipe read upstream: 0
2006/09/04 09:06:32 [debug] 48679#0: *247 pipe preread: 305
2006/09/04 09:06:32 [debug] 48679#0: *247 pipe buf free s:0 t:1 f:0 080F6000, 
pos 080F60A7, size: 305 file: 0, size: 0
2006/09/04 09:06:32 [debug] 48679#0: *247 pipe write downstream: 1
2006/09/04 09:06:32 [debug] 48679#0: *247 pipe write busy: 0
2006/09/04 09:06:32 [debug] 48679#0: *247 pipe write: out:00000000, f:0
2006/09/04 09:06:32 [debug] 48679#0: *247 pipe read upstream: 0
2006/09/04 09:06:32 [debug] 48679#0: *247 pipe buf free s:0 t:1 f:0 080F6000, 
pos 080F60A7, size: 305 file: 0, size: 0
2006/09/04 09:06:32 [debug] 48679#0: *247 event timer: 14, old: 2003849557, 
new: 2003849559
2006/09/04 09:06:32 [debug] 48679#0: *247 post event 0813A12C
2006/09/04 09:06:32 [debug] 48679#0: *247 delete posted event 0813A12C
2006/09/04 09:06:32 [debug] 48679#0: *247 http upstream process upstream
2006/09/04 09:06:32 [debug] 48679#0: *247 pipe read upstream: 1
2006/09/04 09:06:32 [debug] 48679#0: *247 pipe buf free s:0 t:1 f:0 080F6000, 
pos 080F60A7, size: 305 file: 0, size: 0
2006/09/04 09:06:32 [debug] 48679#0: *247 input buf #0
2006/09/04 09:06:32 [debug] 48679#0: *247 pipe write downstream: 1
2006/09/04 09:06:32 [debug] 48679#0: *247 pipe write downstream flush in
2006/09/04 09:06:32 [debug] 48679#0: *247 http output filter "/?"
2006/09/04 09:06:32 [debug] 48679#0: *247 copy filter: "/?"
2006/09/04 09:06:32 [debug] 48679#0: *247 http postpone filter "/?" 080C2D8C
2006/09/04 09:06:32 [debug] 48679#0: *247 http postpone filter out "/?"
2006/09/04 09:06:32 [debug] 48679#0: *247 http chunk: 305
2006/09/04 09:06:32 [debug] 48679#0: *247 write old buf t:1 f:0 080C2BF0, pos 
080C2BF0, size: 181 file: 0, size: 0
2006/09/04 09:06:32 [debug] 48679#0: *247 write new buf t:1 f:0 00000000, pos 
080C2E08, size: 5 file: 0, size: 0
2006/09/04 09:06:32 [debug] 48679#0: *247 write new buf t:1 f:0 080F6000, pos 
080F60A7, size: 305 file: 0, size: 0
2006/09/04 09:06:32 [debug] 48679#0: *247 write new buf t:0 f:0 00000000, pos 
08095EB9, size: 2 file: 0, size: 0
2006/09/04 09:06:32 [debug] 48679#0: *247 http write filter: l:0 f:0 s:493
2006/09/04 09:06:32 [debug] 48679#0: *247 copy filter: 0 "/?"
2006/09/04 09:06:32 [debug] 48679#0: *247 pipe write downstream done
2006/09/04 09:06:32 [debug] 48679#0: *247 event timer: 14, old: 2003849557, 
new: 2003849559
2006/09/04 09:06:32 [debug] 48679#0: *247 http upstream exit: 00000000
2006/09/04 09:06:32 [debug] 48679#0: *247 finalize http upstream request: 0
2006/09/04 09:06:32 [debug] 48679#0: *247 finalize http proxy request
2006/09/04 09:06:32 [debug] 48679#0: *247 close http upstream connection: 14
2006/09/04 09:06:32 [debug] 48679#0: *247 event timer del: 14: 2003849557
2006/09/04 09:06:32 [debug] 48679#0: *247 http upstream temp fd: -1
2006/09/04 09:06:32 [debug] 48679#0: *247 http output filter "/?"
2006/09/04 09:06:32 [debug] 48679#0: *247 copy filter: "/?"
2006/09/04 09:06:32 [debug] 48679#0: *247 http postpone filter "/?" BFBFE7F8
2006/09/04 09:06:32 [debug] 48679#0: *247 http postpone filter out "/?"
2006/09/04 09:06:32 [debug] 48679#0: *247 http chunk: 0
2006/09/04 09:06:32 [debug] 48679#0: *247 write old buf t:1 f:0 080C2BF0, pos 
080C2BF0, size: 181 file: 0, size: 0
2006/09/04 09:06:32 [debug] 48679#0: *247 write old buf t:1 f:0 00000000, pos 
080C2E08, size: 5 file: 0, size: 0
2006/09/04 09:06:32 [debug] 48679#0: *247 write old buf t:1 f:0 080F6000, pos 
080F60A7, size: 305 file: 0, size: 0
2006/09/04 09:06:32 [debug] 48679#0: *247 write old buf t:0 f:0 00000000, pos 
08095EB9, size: 2 file: 0, size: 0
2006/09/04 09:06:32 [debug] 48679#0: *247 write new buf t:0 f:0 00000000, pos 
08095EB6, size: 5 file: 0, size: 0
2006/09/04 09:06:32 [debug] 48679#0: *247 http write filter: l:1 f:0 s:498
2006/09/04 09:06:32 [debug] 48679#0: *247 http write filter to send 0
2006/09/04 09:06:32 [debug] 48679#0: *247 writev: 498 of 498
2006/09/04 09:06:32 [debug] 48679#0: *247 http write filter 00000000
2006/09/04 09:06:32 [debug] 48679#0: *247 copy filter: 0 "/?"
2006/09/04 09:06:32 [debug] 48679#0: *247 http finalize request: 0, "/?"
2006/09/04 09:06:32 [debug] 48679#0: *247 set http keepalive handler
2006/09/04 09:06:32 [debug] 48679#0: *247 http close request
2006/09/04 09:06:32 [debug] 48679#0: *247 http log handler
2006/09/04 09:06:32 [debug] 48679#0: *247 free: 080F6000
2006/09/04 09:06:32 [debug] 48679#0: *247 free: 080C2000, unused: 115
2006/09/04 09:06:32 [debug] 48679#0: *247 event timer add: 13: 65000:2003854559
2006/09/04 09:06:32 [debug] 48679#0: *247 free: 080BB000
2006/09/04 09:06:32 [debug] 48679#0: *247 free: 080B7000
2006/09/04 09:06:32 [debug] 48679#0: *247 hc free: 00000000 0
2006/09/04 09:06:32 [debug] 48679#0: *247 hc busy: 00000000 0
2006/09/04 09:06:32 [debug] 48679#0: *247 post event 081580F0
2006/09/04 09:06:32 [debug] 48679#0: *247 delete posted event 081580F0
2006/09/04 09:06:32 [debug] 48679#0: *247 http empty handler


 




Copyright © Lexa Software, 1996-2009.