ПРОЕКТЫ 


  АРХИВ 


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: Помогите переписать пра вила rewrite из htaccess.



Вот кусок лога. Имя странички ref-109755.html. Физически ее нет на сервере. 
Т.е.  запрос "ref-109755.html" должен передаваться в index.html, тот его 
разбирает и отдает соответствующий контент. Но nginx почему то генерит 404 
ошибку.

2010/05/12 16:37:14 [debug] 42322#0: kevent set event: 7: ft:-1 fl:0005
2010/05/12 16:37:22 [debug] 42322#0: post event 2835B000
2010/05/12 16:37:22 [debug] 42322#0: delete posted event 2835B000
2010/05/12 16:37:22 [debug] 42322#0: accept on 0.0.0.0:8000, ready: 1
2010/05/12 16:37:22 [debug] 42322#0: posix_memalign: 28379100:256 @16
2010/05/12 16:37:22 [debug] 42322#0: *1 accept: 85.234.35.113 fd:10
2010/05/12 16:37:22 [debug] 42322#0: *1 event timer add: 10: 60000:2357583064
2010/05/12 16:37:22 [debug] 42322#0: *1 kevent set event: 10: ft:-1 fl:0025
2010/05/12 16:37:22 [debug] 42322#0: *1 post event 2835B078
2010/05/12 16:37:22 [debug] 42322#0: *1 delete posted event 2835B078
2010/05/12 16:37:22 [debug] 42322#0: *1 malloc: 28301400:656
2010/05/12 16:37:22 [debug] 42322#0: *1 malloc: 28302400:1024
2010/05/12 16:37:22 [debug] 42322#0: *1 posix_memalign: 28329000:4096 @16
2010/05/12 16:37:22 [debug] 42322#0: *1 http process request line
2010/05/12 16:37:22 [debug] 42322#0: *1 recv: eof:0, avail:380, err:0
2010/05/12 16:37:22 [debug] 42322#0: *1 recv: fd:10 380 of 1024
2010/05/12 16:37:22 [debug] 42322#0: *1 http request line: "GET 
/ref-109755.html HTTP/1.1"
2010/05/12 16:37:22 [debug] 42322#0: *1 http uri: "/ref-109755.html"
2010/05/12 16:37:22 [debug] 42322#0: *1 http args: ""
2010/05/12 16:37:22 [debug] 42322#0: *1 http exten: "html"
2010/05/12 16:37:22 [debug] 42322#0: *1 http process request header line
2010/05/12 16:37:22 [debug] 42322#0: *1 http header: "Accept: image/gif, 
image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, 
application/vnd.ms-excel, application/msword, */*"
2010/05/12 16:37:22 [debug] 42322#0: *1 http header: "Accept-Language: ru"
2010/05/12 16:37:22 [debug] 42322#0: *1 http header: "User-Agent: Mozilla/4.0 
(compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; 
AskTB5.3)"
2010/05/12 16:37:22 [debug] 42322#0: *1 http header: "Accept-Encoding: gzip, 
deflate"
2010/05/12 16:37:22 [debug] 42322#0: *1 http header: "Host: site.ru:8000"
2010/05/12 16:37:22 [debug] 42322#0: *1 http header: "Connection: Keep-Alive"
2010/05/12 16:37:22 [debug] 42322#0: *1 http header done
2010/05/12 16:37:22 [debug] 42322#0: *1 event timer del: 10: 2357583064
2010/05/12 16:37:22 [debug] 42322#0: *1 generic phase: 0
2010/05/12 16:37:22 [debug] 42322#0: *1 test location: "/"
2010/05/12 16:37:22 [debug] 42322#0: *1 test location: ~ "\.html$"
2010/05/12 16:37:22 [debug] 42322#0: *1 using configuration "\.html$"
2010/05/12 16:37:22 [debug] 42322#0: *1 http cl:-1 max:1048576
2010/05/12 16:37:22 [debug] 42322#0: *1 generic phase: 2
2010/05/12 16:37:22 [debug] 42322#0: *1 post rewrite phase: 3
2010/05/12 16:37:22 [debug] 42322#0: *1 generic phase: 4
2010/05/12 16:37:22 [debug] 42322#0: *1 generic phase: 5
2010/05/12 16:37:22 [debug] 42322#0: *1 access phase: 6
2010/05/12 16:37:22 [debug] 42322#0: *1 access phase: 7
2010/05/12 16:37:22 [debug] 42322#0: *1 post access phase: 8
2010/05/12 16:37:22 [debug] 42322#0: *1 try files phase: 9
2010/05/12 16:37:22 [debug] 42322#0: *1 http init upstream, client timer: 0
2010/05/12 16:37:22 [debug] 42322#0: *1 kevent set event: 10: ft:-2 fl:0025
2010/05/12 16:37:22 [debug] 42322#0: *1 http script copy: "SCRIPT_FILENAME"
2010/05/12 16:37:22 [debug] 42322#0: *1 http script copy: 
"/data/sites/site.ru/htdocs"
2010/05/12 16:37:22 [debug] 42322#0: *1 http script var: "/ref-109755.html"
2010/05/12 16:37:22 [debug] 42322#0: *1 fastcgi param: "SCRIPT_FILENAME: 
/data/sites/site.ru/htdocs/ref-109755.html"
2010/05/12 16:37:22 [debug] 42322#0: *1 http script copy: "QUERY_STRING"
2010/05/12 16:37:22 [debug] 42322#0: *1 fastcgi param: "QUERY_STRING: "
2010/05/12 16:37:22 [debug] 42322#0: *1 http script copy: "REQUEST_METHOD"
2010/05/12 16:37:22 [debug] 42322#0: *1 http script var: "GET"
2010/05/12 16:37:22 [debug] 42322#0: *1 fastcgi param: "REQUEST_METHOD: GET"
2010/05/12 16:37:22 [debug] 42322#0: *1 http script copy: "CONTENT_TYPE"
2010/05/12 16:37:22 [debug] 42322#0: *1 fastcgi param: "CONTENT_TYPE: "
2010/05/12 16:37:22 [debug] 42322#0: *1 http script copy: "CONTENT_LENGTH"
2010/05/12 16:37:22 [debug] 42322#0: *1 fastcgi param: "CONTENT_LENGTH: "
2010/05/12 16:37:22 [debug] 42322#0: *1 http script copy: "SCRIPT_NAME"
2010/05/12 16:37:22 [debug] 42322#0: *1 http script var: "/ref-109755.html"
2010/05/12 16:37:22 [debug] 42322#0: *1 fastcgi param: "SCRIPT_NAME: 
/ref-109755.html"
2010/05/12 16:37:22 [debug] 42322#0: *1 http script copy: "REQUEST_URI"
2010/05/12 16:37:22 [debug] 42322#0: *1 http script var: "/ref-109755.html"
2010/05/12 16:37:22 [debug] 42322#0: *1 fastcgi param: "REQUEST_URI: 
/ref-109755.html"
2010/05/12 16:37:22 [debug] 42322#0: *1 http script copy: "DOCUMENT_URI"
2010/05/12 16:37:22 [debug] 42322#0: *1 http script var: "/ref-109755.html"
2010/05/12 16:37:22 [debug] 42322#0: *1 fastcgi param: "DOCUMENT_URI: 
/ref-109755.html"
2010/05/12 16:37:22 [debug] 42322#0: *1 http script copy: "DOCUMENT_ROOT"
2010/05/12 16:37:22 [debug] 42322#0: *1 http script var: 
"/usr/local/etc/nginx/html"
2010/05/12 16:37:22 [debug] 42322#0: *1 fastcgi param: "DOCUMENT_ROOT: 
/usr/local/etc/nginx/html"
2010/05/12 16:37:22 [debug] 42322#0: *1 http script copy: "SERVER_PROTOCOL"
2010/05/12 16:37:22 [debug] 42322#0: *1 http script var: "HTTP/1.1"
2010/05/12 16:37:22 [debug] 42322#0: *1 fastcgi param: "SERVER_PROTOCOL: 
HTTP/1.1"
2010/05/12 16:37:22 [debug] 42322#0: *1 http script copy: 
"GATEWAY_INTERFACECGI/1.1"
2010/05/12 16:37:22 [debug] 42322#0: *1 fastcgi param: "GATEWAY_INTERFACE: 
CGI/1.1"
2010/05/12 16:37:22 [debug] 42322#0: *1 http script copy: "SERVER_SOFTWARE"
2010/05/12 16:37:22 [debug] 42322#0: *1 http script copy: "nginx/"
2010/05/12 16:37:22 [debug] 42322#0: *1 http script var: "0.8.36"
2010/05/12 16:37:22 [debug] 42322#0: *1 fastcgi param: "SERVER_SOFTWARE: 
nginx/0.8.36"
2010/05/12 16:37:22 [debug] 42322#0: *1 http script copy: "REMOTE_ADDR"
2010/05/12 16:37:22 [debug] 42322#0: *1 http script var: "85.234.35.113"
2010/05/12 16:37:22 [debug] 42322#0: *1 fastcgi param: "REMOTE_ADDR: 
85.234.35.113"
2010/05/12 16:37:22 [debug] 42322#0: *1 http script copy: "REMOTE_PORT"
2010/05/12 16:37:22 [debug] 42322#0: *1 http script var: "65300"
2010/05/12 16:37:22 [debug] 42322#0: *1 fastcgi param: "REMOTE_PORT: 65300"
2010/05/12 16:37:22 [debug] 42322#0: *1 http script copy: "SERVER_ADDR"
2010/05/12 16:37:22 [debug] 42322#0: *1 http script var: "192.168.0.200"
2010/05/12 16:37:22 [debug] 42322#0: *1 fastcgi param: "SERVER_ADDR: 
192.168.0.200"
2010/05/12 16:37:22 [debug] 42322#0: *1 http script copy: "SERVER_PORT"
2010/05/12 16:37:22 [debug] 42322#0: *1 http script var: "8000"
2010/05/12 16:37:22 [debug] 42322#0: *1 fastcgi param: "SERVER_PORT: 8000"
2010/05/12 16:37:22 [debug] 42322#0: *1 http script copy: "SERVER_NAME"
2010/05/12 16:37:22 [debug] 42322#0: *1 http script var: "site.ru"
2010/05/12 16:37:22 [debug] 42322#0: *1 fastcgi param: "SERVER_NAME: site.ru"
2010/05/12 16:37:22 [debug] 42322#0: *1 http script copy: "REDIRECT_STATUS200"
2010/05/12 16:37:22 [debug] 42322#0: *1 fastcgi param: "REDIRECT_STATUS: 200"
2010/05/12 16:37:22 [debug] 42322#0: *1 http cleanup add: 28329BF0
2010/05/12 16:37:22 [debug] 42322#0: *1 get rr peer, try: 1
2010/05/12 16:37:22 [debug] 42322#0: *1 socket 11
2010/05/12 16:37:22 [debug] 42322#0: *1 connect to unix:/tmp/php-fpm.sock, 
fd:11 #2
2010/05/12 16:37:22 [debug] 42322#0: *1 kevent set event: 11: ft:-1 fl:0025
2010/05/12 16:37:22 [debug] 42322#0: *1 connected
2010/05/12 16:37:22 [debug] 42322#0: *1 http upstream connect: 0
2010/05/12 16:37:22 [debug] 42322#0: *1 http upstream send request
2010/05/12 16:37:22 [debug] 42322#0: *1 chain writer buf fl:0 s:880
2010/05/12 16:37:22 [debug] 42322#0: *1 chain writer in: 28329C0C
2010/05/12 16:37:22 [debug] 42322#0: *1 writev: 880 of 880
2010/05/12 16:37:22 [debug] 42322#0: *1 chain writer out: 00000000
2010/05/12 16:37:22 [debug] 42322#0: *1 event timer add: 11: 60000:2357583065
2010/05/12 16:37:22 [debug] 42322#0: *1 http finalize request: -4, 
"/ref-109755.html?" a:1, c:2
2010/05/12 16:37:22 [debug] 42322#0: *1 http request count:2 blk:0
2010/05/12 16:37:22 [debug] 42322#0: *1 post event 2836A078
2010/05/12 16:37:22 [debug] 42322#0: *1 delete posted event 2836A078
2010/05/12 16:37:22 [debug] 42322#0: *1 http run request: "/ref-109755.html?"
2010/05/12 16:37:22 [debug] 42322#0: *1 http upstream check client, write 
event:1, "/ref-109755.html"
2010/05/12 16:37:22 [debug] 42322#0: *1 post event 2835B0B4
2010/05/12 16:37:22 [debug] 42322#0: *1 delete posted event 2835B0B4
2010/05/12 16:37:22 [debug] 42322#0: *1 http upstream request: 
"/ref-109755.html?"
2010/05/12 16:37:22 [debug] 42322#0: *1 http upstream process header
2010/05/12 16:37:22 [debug] 42322#0: *1 malloc: 28321000:4096
2010/05/12 16:37:22 [debug] 42322#0: *1 recv: eof:0, avail:88, err:0
2010/05/12 16:37:22 [debug] 42322#0: *1 recv: fd:11 88 of 4096
2010/05/12 16:37:22 [debug] 42322#0: *1 http fastcgi record byte: 01
2010/05/12 16:37:22 [debug] 42322#0: *1 http fastcgi record byte: 06
2010/05/12 16:37:22 [debug] 42322#0: *1 http fastcgi record byte: 00
2010/05/12 16:37:22 [debug] 42322#0: *1 http fastcgi record byte: 01
2010/05/12 16:37:22 [debug] 42322#0: *1 http fastcgi record byte: 00
2010/05/12 16:37:22 [debug] 42322#0: *1 http fastcgi record byte: 4C
2010/05/12 16:37:22 [debug] 42322#0: *1 http fastcgi record byte: 04
2010/05/12 16:37:22 [debug] 42322#0: *1 http fastcgi record byte: 00
2010/05/12 16:37:22 [debug] 42322#0: *1 http fastcgi record length: 76
2010/05/12 16:37:22 [debug] 42322#0: *1 http fastcgi parser: 0
2010/05/12 16:37:22 [debug] 42322#0: *1 http fastcgi header: "Status: 404 Not 
Found"
2010/05/12 16:37:22 [debug] 42322#0: *1 http fastcgi parser: 0
2010/05/12 16:37:22 [debug] 42322#0: *1 http fastcgi header: "X-Powered-By: 
PHP/5.2.12"
2010/05/12 16:37:22 [debug] 42322#0: *1 http fastcgi parser: 0
2010/05/12 16:37:22 [debug] 42322#0: *1 http fastcgi header: "Content-type: 
text/html"
2010/05/12 16:37:22 [debug] 42322#0: *1 http fastcgi parser: 1
2010/05/12 16:37:22 [debug] 42322#0: *1 http fastcgi header done
2010/05/12 16:37:22 [debug] 42322#0: *1 HTTP/1.1 404 Not Found
Server: nginx
Date: Wed, 12 May 2010 12:37:22 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Connection: keep-alive
X-Powered-By: PHP/5.2.12

2010/05/12 16:37:22 [debug] 42322#0: *1 write new buf t:1 f:0 28329D74, pos 
28329D74, size: 181 file: 0, size: 0
2010/05/12 16:37:22 [debug] 42322#0: *1 http write filter: l:0 f:0 s:181
2010/05/12 16:37:22 [debug] 42322#0: *1 http cacheable: 0
2010/05/12 16:37:22 [debug] 42322#0: *1 http upstream process upstream
2010/05/12 16:37:22 [debug] 42322#0: *1 pipe read upstream: 0
2010/05/12 16:37:22 [debug] 42322#0: *1 pipe preread: 4
2010/05/12 16:37:22 [debug] 42322#0: *1 pipe buf free s:0 t:1 f:0 28321000, pos 
28321054, size: 4 file: 0, size: 0
2010/05/12 16:37:22 [debug] 42322#0: *1 pipe write downstream: 1
2010/05/12 16:37:22 [debug] 42322#0: *1 pipe write busy: 0
2010/05/12 16:37:22 [debug] 42322#0: *1 pipe write: out:00000000, f:0
2010/05/12 16:37:22 [debug] 42322#0: *1 pipe read upstream: 0
2010/05/12 16:37:22 [debug] 42322#0: *1 pipe buf free s:0 t:1 f:0 28321000, pos 
28321054, size: 4 file: 0, size: 0
2010/05/12 16:37:22 [debug] 42322#0: *1 event timer: 11, old: 2357583065, new: 
2357583071
2010/05/12 16:37:22 [debug] 42322#0: *1 post event 2835B0B4
2010/05/12 16:37:22 [debug] 42322#0: *1 delete posted event 2835B0B4
2010/05/12 16:37:22 [debug] 42322#0: *1 http upstream request: 
"/ref-109755.html?"
2010/05/12 16:37:22 [debug] 42322#0: *1 http upstream process upstream
2010/05/12 16:37:22 [debug] 42322#0: *1 pipe read upstream: 1
2010/05/12 16:37:22 [debug] 42322#0: *1 readv: eof:0, avail:16, err:0
2010/05/12 16:37:22 [debug] 42322#0: *1 readv: 1, last:4008
2010/05/12 16:37:22 [debug] 42322#0: *1 pipe recv chain: 16
2010/05/12 16:37:22 [debug] 42322#0: *1 pipe buf free s:0 t:1 f:0 28321000, pos 
28321054, size: 20 file: 0, size: 0
2010/05/12 16:37:22 [debug] 42322#0: *1 pipe write downstream: 1
2010/05/12 16:37:22 [debug] 42322#0: *1 pipe write busy: 0
2010/05/12 16:37:22 [debug] 42322#0: *1 pipe write: out:00000000, f:0
2010/05/12 16:37:22 [debug] 42322#0: *1 pipe read upstream: 0
2010/05/12 16:37:22 [debug] 42322#0: *1 pipe buf free s:0 t:1 f:0 28321000, pos 
28321054, size: 20 file: 0, size: 0
2010/05/12 16:37:22 [debug] 42322#0: *1 event timer: 11, old: 2357583065, new: 
2357583074
2010/05/12 16:37:22 [debug] 42322#0: *1 post event 2835B0B4
2010/05/12 16:37:22 [debug] 42322#0: *1 delete posted event 2835B0B4
2010/05/12 16:37:22 [debug] 42322#0: *1 http upstream request: 
"/ref-109755.html?"
2010/05/12 16:37:22 [debug] 42322#0: *1 http upstream process upstream
2010/05/12 16:37:22 [debug] 42322#0: *1 pipe read upstream: 1
2010/05/12 16:37:22 [debug] 42322#0: *1 pipe buf free s:0 t:1 f:0 28321000, pos 
28321054, size: 20 file: 0, size: 0
2010/05/12 16:37:22 [debug] 42322#0: *1 http fastcgi record byte: 01
2010/05/12 16:37:22 [debug] 42322#0: *1 http fastcgi record byte: 03
2010/05/12 16:37:22 [debug] 42322#0: *1 http fastcgi record byte: 00
2010/05/12 16:37:22 [debug] 42322#0: *1 http fastcgi record byte: 01
2010/05/12 16:37:22 [debug] 42322#0: *1 http fastcgi record byte: 00
2010/05/12 16:37:22 [debug] 42322#0: *1 http fastcgi record byte: 08
2010/05/12 16:37:22 [debug] 42322#0: *1 http fastcgi record byte: 00
2010/05/12 16:37:22 [debug] 42322#0: *1 http fastcgi record byte: 00
2010/05/12 16:37:22 [debug] 42322#0: *1 http fastcgi record length: 8
2010/05/12 16:37:22 [debug] 42322#0: *1 http fastcgi sent end request
2010/05/12 16:37:22 [debug] 42322#0: *1 free: 28321000
2010/05/12 16:37:22 [debug] 42322#0: *1 pipe write downstream: 1
2010/05/12 16:37:22 [debug] 42322#0: *1 pipe write downstream done
2010/05/12 16:37:22 [debug] 42322#0: *1 event timer: 11, old: 2357583065, new: 
2357583074
2010/05/12 16:37:22 [debug] 42322#0: *1 http upstream exit: 00000000
2010/05/12 16:37:22 [debug] 42322#0: *1 finalize http upstream request: 0
2010/05/12 16:37:22 [debug] 42322#0: *1 finalize http fastcgi request
2010/05/12 16:37:22 [debug] 42322#0: *1 free rr peer 1 0
2010/05/12 16:37:22 [debug] 42322#0: *1 close http upstream connection: 11
2010/05/12 16:37:22 [debug] 42322#0: *1 event timer del: 11: 2357583065
2010/05/12 16:37:22 [debug] 42322#0: *1 http upstream temp fd: -1
2010/05/12 16:37:22 [debug] 42322#0: *1 http output filter "/ref-109755.html?"
2010/05/12 16:37:22 [debug] 42322#0: *1 http copy filter: "/ref-109755.html?"
2010/05/12 16:37:22 [debug] 42322#0: *1 http postpone filter 
"/ref-109755.html?" BFBFE8A8
2010/05/12 16:37:22 [debug] 42322#0: *1 http chunk: 0
2010/05/12 16:37:22 [debug] 42322#0: *1 write old buf t:1 f:0 28329D74, pos 
28329D74, size: 181 file: 0, size: 0
2010/05/12 16:37:22 [debug] 42322#0: *1 write new buf t:0 f:0 00000000, pos 
080B09A6, size: 5 file: 0, size: 0
2010/05/12 16:37:22 [debug] 42322#0: *1 http write filter: l:1 f:0 s:186
2010/05/12 16:37:22 [debug] 42322#0: *1 http write filter limit 0
2010/05/12 16:37:22 [debug] 42322#0: *1 writev: 186 of 186
2010/05/12 16:37:22 [debug] 42322#0: *1 http write filter 00000000
2010/05/12 16:37:22 [debug] 42322#0: *1 http copy filter: 0 "/ref-109755.html?"
2010/05/12 16:37:22 [debug] 42322#0: *1 http finalize request: 0, 
"/ref-109755.html?" a:1, c:1
2010/05/12 16:37:22 [debug] 42322#0: *1 set http keepalive handler
2010/05/12 16:37:22 [debug] 42322#0: *1 http close request
2010/05/12 16:37:22 [debug] 42322#0: *1 http log handler
2010/05/12 16:37:22 [debug] 42322#0: *1 posix_memalign: 28321000:4096 @16
2010/05/12 16:37:22 [debug] 42322#0: *1 free: 00000000
2010/05/12 16:37:22 [debug] 42322#0: *1 free: 28329000, unused: 116
2010/05/12 16:37:22 [debug] 42322#0: *1 free: 28321000, unused: 3872
2010/05/12 16:37:22 [debug] 42322#0: *1 event timer add: 10: 65000:2357588074
2010/05/12 16:37:22 [debug] 42322#0: *1 free: 28301400
2010/05/12 16:37:22 [debug] 42322#0: *1 free: 28302400
2010/05/12 16:37:22 [debug] 42322#0: *1 hc free: 00000000 0
2010/05/12 16:37:22 [debug] 42322#0: *1 hc busy: 00000000 0
2010/05/12 16:37:22 [debug] 42322#0: *1 tcp_nodelay
2010/05/12 16:37:22 [debug] 42322#0: *1 post event 2836A078
2010/05/12 16:37:22 [debug] 42322#0: *1 delete posted event 2836A078
2010/05/12 16:37:22 [debug] 42322#0: *1 http empty handler
2010/05/12 16:38:27 [debug] 42322#0: *1 event timer del: 10: 2357588074
2010/05/12 16:38:27 [debug] 42322#0: *1 http keepalive handler
2010/05/12 16:38:27 [debug] 42322#0: *1 close http connection: 10
2010/05/12 16:38:27 [debug] 42322#0: *1 free: 00000000
2010/05/12 16:38:27 [debug] 42322#0: *1 free: 00000000
2010/05/12 16:38:27 [debug] 42322#0: *1 free: 28379100, unused: 40

Posted at Nginx Forum: http://forum.nginx.org/read.php?21,81972,85829#msg-85829


_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.