Странная проблема при отсутствии trailing slash в URL
Alex Umansky
alex.umansky at gmail.com
Tue Dec 9 16:45:16 MSK 2008
Добрый день,
У меня возникла странная проблема, на которую я раньше не обращал внимания
Случайно возникла при неправильном запросе...
При запросе на директорию, но без слеша в конце, идет редирект 301 на
бекенд
при запросе со слешем все нормально проксируется
http://www.domain.com/dir --> http://dynamic.domain.com/dir/
Но директория на фронте существует и даже, если ее не было, то почему
редирект а не proxy_pass?
nginx 0.6.34
кусок лога прилагается:
2008/12/09 08:18:57 [debug] 21886#0: *94019 http cleanup add: 098426D4
2008/12/09 08:18:57 [debug] 21886#0: *94019 get rr peer, try: 1
2008/12/09 08:18:57 [debug] 21886#0: *94019 socket 53
2008/12/09 08:18:57 [debug] 21886#0: *94019 epoll add connection: fd:53
ev:80000005
2008/12/09 08:18:57 [debug] 21886#0: *94019 connect to 10.232.22.170:80,
fd:53 #94030
2008/12/09 08:18:57 [debug] 21886#0: *94019 http upstream connect: -2
2008/12/09 08:18:57 [debug] 21886#0: *94019 event timer add: 53:
90000:468180723
2008/12/09 08:18:57 [debug] 21886#0: *94019 http upstream check client,
write event:1, "/feedback"
2008/12/09 08:18:57 [debug] 21886#0: *94019 http upstream recv(): -1 (11:
Resource temporarily unavailable)
2008/12/09 08:18:57 [debug] 21886#0: *94019 http upstream send request
handler
2008/12/09 08:18:57 [debug] 21886#0: *94019 http upstream send request
2008/12/09 08:18:57 [debug] 21886#0: *94019 chain writer buf fl:1 s:1050
2008/12/09 08:18:57 [debug] 21886#0: *94019 chain writer in: 098426F0
2008/12/09 08:18:57 [debug] 21886#0: *94019 writev: 1050
2008/12/09 08:18:57 [debug] 21886#0: *94019 chain writer out: 00000000
2008/12/09 08:18:57 [debug] 21886#0: *94019 event timer del: 53: 468180723
2008/12/09 08:18:57 [debug] 21886#0: *94019 event timer add: 53:
90000:468180726
2008/12/09 08:18:57 [debug] 21886#0: *94019 post event B7B52218
2008/12/09 08:18:57 [debug] 21886#0: *94019 post event B79B5218
2008/12/09 08:18:57 [debug] 21886#0: *94019 delete posted event B79B5218
2008/12/09 08:18:57 [debug] 21886#0: *94019 http upstream dummy handler
2008/12/09 08:18:57 [debug] 21886#0: *94019 delete posted event B7B52218
2008/12/09 08:18:57 [debug] 21886#0: *94019 http upstream process header
2008/12/09 08:18:57 [debug] 21886#0: *94019 malloc: 0984C3E8:4096
2008/12/09 08:18:57 [debug] 21886#0: *94019 recv: fd:53 540 of 4096
2008/12/09 08:18:57 [debug] 21886#0: *94019 http proxy status 301 "301 Moved
Permanently"
2008/12/09 08:18:57 [debug] 21886#0: *94019 http proxy header: "Date: Tue,
09 Dec 2008 13:17:18 GMT"
2008/12/09 08:18:57 [debug] 21886#0: *94019 http proxy header: "Server:
Apache"
2008/12/09 08:18:57 [debug] 21886#0: *94019 http proxy header: "Location:
http://dynamic.domain.com/feedback/"
2008/12/09 08:18:57 [debug] 21886#0: *94019 http proxy header:
"Content-Length: 315"
2008/12/09 08:18:57 [debug] 21886#0: *94019 http proxy header: "Connection:
close"
2008/12/09 08:18:57 [debug] 21886#0: *94019 http proxy header:
"Content-Type: text/html; charset=iso-8859-1"
2008/12/09 08:18:57 [debug] 21886#0: *94019 http proxy header done
2008/12/09 08:18:57 [debug] 21886#0: *94019 HTTP/1.1 301 Moved Permanently
Server: nginx/0.6.34
Date: Tue, 09 Dec 2008 13:18:57 GMT
Content-Type: text/html; charset=iso-8859-1
Connection: keep-alive
Keep-Alive: timeout=30
Location: http://dynamic.domain.com/feedback/
Content-Length: 315
Спасибо!
Алекс
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx-ru/attachments/20081209/a53c140f/attachment.html>
More information about the nginx-ru
mailing list