Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Странная проблема при отсутствии trailing slash в URL
- To: nginx-ru@xxxxxxxxx
- Subject: Re: Странная проблема при отсутствии trailing slash в URL
- From: "Никита Козлов" <niakrisn@xxxxxxxxx>
- Date: Tue, 9 Dec 2008 17:11:33 +0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=e9OUHys3RYT1D6RR/fkhTZL4+NyZ0Vd2GsLvx03SnCU=; b=VxUp483TJHDFTM6htZYbxSycEcPGgJlbwkoy1oYAIs8ZwO5nZON/qWVg49m9BQ2mvW dSBFCKvoe13LFhHqnchRmmZmiUoLqCo0nq/Knc1tSyvEcptG4YRfDJx/40bbvL1Wz63w Mwz7YMDI+6/axCfVaKQDtjIsHUOqPlvB0oWBg=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=G1NYpYeRANAmo1KWSSH3aRUxXKkpzFl0ynp72UvBQYK69aYslIdsnEadYrszf0Glqm r6YoN81qUh4iMjo/ss9yjNKSs5CAoWd4kSpRx7OAoVgdwIx8v7RuByDb2tI0kAYQ4peL xwYEtfmAkTnHGDe1NH/wYyAng85I5ppyv1DXk=
- In-reply-to: <ddba595d0812090545y68e4b18ds397e20003748ed75@xxxxxxxxxxxxxx>
- References: <ddba595d0812090545y68e4b18ds397e20003748ed75@xxxxxxxxxxxxxx>
А в конфиге этот локейшен прописан со слешом в конце?
9 декабря 2008 г. 16:45 пользователь Alex Umansky
<alex.umansky@xxxxxxxxx> написал:
> Добрый день,
> У меня возникла странная проблема, на которую я раньше не обращал внимания
> Случайно возникла при неправильном запросе...
>
> При запросе на директорию, но без слеша в конце, идет редирект 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
>
> Спасибо!
> Алекс
>
|