2011-10-28 126 views
1
location /pal:/MM9.1 { 
    rewrite /pal:(.*) /search/recordDetails/show?uri=$scheme://localwww.domain.org$uri; 
    proxy_pass http://$remote_addr:8080; 
} 

我有一個簡單的重寫規則,它重寫後代理請求。我在Nginx中打開了調試。它說它重寫了url,但代理原始url而不是重寫的url。注意代理請求:Nginx重寫不改寫

"GET /pal:/MM9.1.2/MMVC-SNL/p1 HTTP/1.0 
Host: 10.88.36.109:8080 

它應該是重寫的url。我在訪問日誌中的目標服務器上收到了此請求。這裏是全部輸出:

2011/10/28 16:39:23 [debug] 55244#0: accept on 0.0.0.0:443, ready: 1<br> 
2011/10/28 16:39:23 [debug] 55244#0: posix_memalign: 0000000100220A10:256 @16<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 accept: 10.88.36.109 fd:11<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 event timer add: 11: 60000:1319841623914<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 kevent set event: 11: ft:-1 fl:0025<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 malloc: 000000010081BA00:1256<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 posix_memalign: 00000001002205A0:256 @16<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 malloc: 0000000100844600:1024<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 posix_memalign: 0000000100804200:4096 @16<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http check ssl handshake<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 https ssl handshake: 0x16<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 SSL server name: "localwww.domain.org"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 SSL_do_handshake: -1<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 SSL_get_error: 2<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 SSL handshake handler: 0<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 SSL_do_handshake: 1<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 SSL: TLSv1, cipher: "DHE-RSA-AES256-SHA SSLv3 Kx=DH Au=RSA Enc=AES(256) Mac=SHA1"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 SSL reused session<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http process request line<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 SSL_read: 1024<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http request line: "GET /pal:/MM9.1.2/MMVC-SNL/p1 HTTP/1.1"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http uri: "/pal:/MM9.1.2/MMVC-SNL/p1"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http args: ""<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http exten: ""<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http process request header line<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http header: "Host: localwww.domain.org"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http header: "User-Agent: Mozilla/5.0 (X11; Linux i686; rv:6.0.2) Gecko/20100101 Firefox/6.0.2"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http header: "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http header: "Accept-Language: en-US,en;q=0.8,en-gb;q=0.5,en;q=0.3"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http header: "Accept-Encoding: gzip, deflate"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http header: "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http header: "Connection: keep-alive"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http alloc large header buffer<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 posix_memalign: 000000010021F580:256 @16<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 malloc: 000000010087B000:8192<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http large header alloc: 000000010087B000 8192<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http large header copy: 638<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 SSL_read: 228<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 SSL_read: -1<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 SSL_get_error: 2<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http header done<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 event timer del: 11: 1319841623914<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 rewrite phase: 0<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 test location: "/"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 test location: "pal:/MM9.2"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 test location: "lls/pal:"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 test location: "pal:/MM9.1"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 using configuration "/pal:/MM9.1"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http cl:-1 max:1048576<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 rewrite phase: 2<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http script var<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http script var: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http script regex: "^application/xml.*"<br> 
2011/10/28 16:39:23 [notice] 55244#0: *3 "^application/xml.*" does not match "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", client: 10.88.36.109, server: localwww.domain.org, request: "GET /pal:/MM9.1.2/MMVC-SNL/p1 HTTP/1.1", host: "localwww.domain.org"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http script if<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http script if: false<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http script var<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http script var: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http script regex: "^application/json.*"<br> 
2011/10/28 16:39:23 [notice] 55244#0: *3 "^application/json.*" does not match "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", client: 10.88.36.109, server: localwww.domain.org, request: "GET /pal:/MM9.1.2/MMVC-SNL/p1 HTTP/1.1", host: "localwww.domain.org"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http script if<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http script if: false<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http script regex: "/pal:(.*)"<br> 
2011/10/28 16:39:23 [notice] 55244#0: *3 "/pal:(.*)" matches "/pal:/MM9.1.2/MMVC-SNL/p1", client: 10.88.36.109, server: localwww.domain.org, request: "GET /pal:/MM9.1.2/MMVC-SNL/p1 HTTP/1.1", host: "localwww.domain.org"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http script copy: "/search/recordDetails/show"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http script args<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http script copy: "uri="<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http script var: "https"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http script copy: "://localwww.domain.org"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http script var: "/pal:/MM9.1.2/MMVC-SNL/p1"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http script regex end<br> 
2011/10/28 16:39:23 [notice] 55244#0: *3 rewritten data: "/search/recordDetails/show", args: "uri=https://localwww.domain.org/pal:/MM9.1.2/MMVC-SNL/p1", client: 10.88.36.109, server: localwww.domain.org, request: "GET /pal:/MM9.1.2/MMVC-SNL/p1 HTTP/1.1", host: "localwww.domain.org"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 post rewrite phase: 3<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 uri changes: 11<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 test location: "/"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 test location: "pal:/MM9.2"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 test location: "records/pal:"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 test location: "search"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 test location: "api/search"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 test location: "/records"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 using configuration "/search"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http cl:-1 max:1048576<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 rewrite phase: 2<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 post rewrite phase: 3<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 generic phase: 4<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 generic phase: 5<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 access phase: 6<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 access phase: 7<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 post access phase: 8<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http script copy: "http://"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http script var: "10.88.36.109"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http script copy: ":8080"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 posix_memalign: 000000010087A000:4096 @16<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http init upstream, client timer: 0<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 kevent set event: 11: ft:-2 fl:0025<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http script copy: "Host: "<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http script var: "10.88.36.109:8080"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http script copy: "<br> 
"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http script copy: "Connection: close<br> 
"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http proxy header: "User-Agent: Mozilla/5.0 (X11; Linux i686; rv:6.0.2) Gecko/20100101 Firefox/6.0.2"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http proxy header: "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http proxy header: "Accept-Language: en-US,en;q=0.8,en-gb;q=0.5,en;q=0.3"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http proxy header: "Accept-Encoding: gzip, deflate"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http proxy header: "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http proxy header:<br> 
"GET /pal:/MM9.1.2/MMVC-SNL/p1 HTTP/1.0<br> 
Host: 10.88.36.109:8080<br> 
Connection: close<br> 
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:6.0.2) Gecko/20100101 Firefox/6.0.2<br> 
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8<br> 
Accept-Language: en-US,en;q=0.8,en-gb;q=0.5,en;q=0.3<br> 
Accept-Encoding: gzip, deflate<br> 
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http cleanup add: 000000010087A700<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 name was resolved to 10.88.36.109<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 get rr peer, try: 1<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 socket 12<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 connect to 10.88.36.109:8080, fd:12 #4<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 kevent set event: 12: ft:-1 fl:0025<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 kevent set event: 12: ft:-2 fl:0025<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http upstream connect: -2<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 event timer add: 12: 60000:1319841623917<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http finalize request: -4, "/search/recordDetails/show?uri=https://localwww.domain.org/pal:/MM9.1.2/MMVC-SNL/p1" a:1, c:2<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http request count:2 blk:0<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http run request: "/search/recordDetails/show?uri=https://localwww.domain.org/pal:/MM9.1.2/MMVC-SNL/p1"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http upstream check client, write event:1, "/search/recordDetails/show"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http upstream request: "/search/recordDetails/show?uri=https://localwww.domain.org/pal:/MM9.1.2/MMVC-SNL/p1"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http upstream send request handler<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http upstream send request<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 chain writer buf fl:1 s:1239<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 chain writer in: 000000010087A7F0<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 writev: 1239 of 1239<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 chain writer out: 0000000000000000<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 event timer del: 12: 1319841623917<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 event timer add: 12: 60000:1319841623919<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http upstream request: "/search/recordDetails/show?uri=https://localwww.domain.org/pal:/MM9.1.2/MMVC-SNL/p1"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http upstream dummy handler<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http upstream request: "/search/recordDetails/show?uri=https://localwww.domain.org/pal:/MM9.1.2/MMVC-SNL/p1"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http upstream process header<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 malloc: 0000000100879000:4096<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 recv: eof:1, avail:111, err:0<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 recv: fd:12 111 of 4096<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http proxy status 400 "400 Bad Request"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http proxy header: "Server: Apache-Coyote/1.1"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http proxy header: "Date: Fri, 28 Oct 2011 22:40:04 GMT"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http proxy header: "Connection: close"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http proxy header done<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http subs filter header ignored, this may be special or compressed response<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 HTTP/1.1 400 Bad Request<br> 
Server: nginx/1.0.8<br> 
Date: Fri, 28 Oct 2011 22:39:23 GMT<br> 
Transfer-Encoding: chunked<br> 
Connection: keep-alive<br> 

2011/10/28 16:39:23 [debug] 55244#0: *3 write new buf t:1 f:0 000000010087AA60, pos 000000010087AA60, size: 138 file: 0, size: 0<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http write filter: l:0 f:0 s:138<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http cacheable: 0<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http upstream process upstream<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 pipe read upstream: 1<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 pipe preread: 0<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 pipe buf free s:0 t:1 f:0 0000000100879000, pos 000000010087906F, size: 0 file: 0, size: 0<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 pipe write downstream: 1<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 pipe write downstream done<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 event timer: 12, old: 1319841623919, new: 1319841623920<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http upstream exit: 0000000000000000<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 finalize http upstream request: 0<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 finalize http proxy request<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 free rr peer 1 0<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 close http upstream connection: 12<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 event timer del: 12: 1319841623919<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 reusable connection: 0<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http upstream temp fd: -1<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http output filter "/search/recordDetails/show?uri=https://localwww.domain.org/pal:/MM9.1.2/MMVC-SNL/p1"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http copy filter: "/search/recordDetails/show?uri=https://localwww.domain.org/pal:/MM9.1.2/MMVC-SNL/p1"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http postpone filter "/search/recordDetails/show?uri=https://localwww.domain.org/pal:/MM9.1.2/MMVC-SNL/p1" 00007FFF5FBFF510<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http chunk: 0<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 write old buf t:1 f:0 000000010087AA60, pos 000000010087AA60, size: 138 file: 0, size: 0<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 write new buf t:0 f:0 0000000000000000, pos 0000000100074D56, size: 5 file: 0, size: 0<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http write filter: l:1 f:0 s:143<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http write filter limit 0<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 malloc: 0000000100866600:16384<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 SSL buf copy: 138<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 SSL buf copy: 5<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 SSL to write: 143<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 SSL_write: 143<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http write filter 0000000000000000<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http copy filter: 0 "/search/recordDetails/show?uri=https://localwww.domain.org/pal:/MM9.1.2/MMVC-SNL/p1"<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http finalize request: 0, "/search/recordDetails/show?uri=https://localwww.domain.org/pal:/MM9.1.2/MMVC-SNL/p1" a:1, c:1<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 set http keepalive handler<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http close request<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http log handler<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 free: 0000000100879000<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 free: 0000000100804200, unused: 0<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 free: 000000010087A000, unused: 502<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 event timer add: 11: 65000:1319841628920<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 free: 000000010081BA00<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 free: 0000000100844600<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 hc free: 0000000000000000 0<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 hc busy: 0000000100220658 1<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 free: 000000010087B000<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 free: 0000000100866600<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 tcp_nodelay<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 reusable connection: 1<br> 
2011/10/28 16:39:23 [debug] 55244#0: *3 http empty handler<br> 
2011/10/28 16:40:28 [debug] 55244#0: *3 event timer del: 11: 1319841628920<br> 
2011/10/28 16:40:28 [debug] 55244#0: *3 http keepalive handler<br> 
2011/10/28 16:40:28 [debug] 55244#0: *3 close http connection: 11<br> 
2011/10/28 16:40:28 [debug] 55244#0: *3 SSL_shutdown: 1<br> 
2011/10/28 16:40:28 [debug] 55244#0: *3 reusable connection: 0<br> 
2011/10/28 16:40:28 [debug] 55244#0: *3 free: 0000000000000000<br> 
2011/10/28 16:40:28 [debug] 55244#0: *3 free: 0000000000000000<br> 
2011/10/28 16:40:28 [debug] 55244#0: *3 free: 0000000000000000<br> 
2011/10/28 16:40:28 [debug] 55244#0: *3 free: 0000000000000000<br> 
2011/10/28 16:40:28 [debug] 55244#0: *3 free: 0000000100220A10, unused: 8<br> 
2011/10/28 16:40:28 [debug] 55244#0: *3 free: 00000001002205A0, unused: 8<br> 
2011/10/28 16:40:28 [debug] 55244#0: *3 free: 000000010021F580, unused: 64<br> 
+0

我從目標服務器收到一個400錯誤的請求響應。源服務器和目標服務器是相同的。這應該不重要。 – user1007983

回答

1

proxy_pass有能力在一次調用中重寫和代理。 這解決了我的問題。這裏是代碼

location /pal:/MM9.1 
{ 
    proxy_pass http://$remote_addr:8080/search/recordDetails/show? uri=$scheme://localwww.domain.org$uri; 
}