nginx MS Exchange RPC proxy

DigitalShaman nginx-forum на nginx.us
Пт Фев 26 00:57:08 MSK 2010


Доброе время суток, длительное время пытаюсь подружить nginx с ms exchange 2003 HTTP-RPC (для работы outlook)


Данная связка работает на apache но только в версиях до 2.0.55 https://issues.apache.org/bugzilla/show_bug.cgi?id=40029 

Есть ли возможность реализовать "рабочий" механизм для работы HTTP-RPC с помощью nginx? 

Симптомы по которым можно посмотреть работоспособность:
если открывать ссылку RPC из браузера http://frontendexch/rpc/rpcproxy.dll то после авторизации просто появится пустая страница.
Если открыть через nginx - https://imap.site.ua/rpc/rpcproxy.dll то после авторизации получаем 502 Bad Gateway

Спасибо.

nginx 0.8.33

location /rpc       { proxy_pass http://frontendexch.kernel.local; }


2010/02/25 23:34:13  27985#0: *18 http cl:-1 max:2097152000
2010/02/25 23:34:13  27985#0: *18 generic phase: 2
2010/02/25 23:34:13  27985#0: *18 post rewrite phase: 3
2010/02/25 23:34:13  27985#0: *18 generic phase: 4
2010/02/25 23:34:13  27985#0: *18 generic phase: 5
2010/02/25 23:34:13  27985#0: *18 access phase: 6
2010/02/25 23:34:13  27985#0: *18 access phase: 7
2010/02/25 23:34:13  27985#0: *18 post access phase: 8
2010/02/25 23:34:13  27985#0: *18 http init upstream, client timer: 0
2010/02/25 23:34:13  27985#0: *18 epoll add event: fd:27 op:3 ev:80000005
2010/02/25 23:34:13  27985#0: *18 http script copy: "Host: imap.site.ua
"
2010/02/25 23:34:13  27985#0: *18 http script copy: "X-Real-IP: "
2010/02/25 23:34:13  27985#0: *18 http script var: "10.100.20.4"
2010/02/25 23:34:13  27985#0: *18 http script copy: "
"
2010/02/25 23:34:13  27985#0: *18 http script copy: "X-Forwarded-For: "
2010/02/25 23:34:13  27985#0: *18 http script var: "10.100.20.4"
2010/02/25 23:34:13  27985#0: *18 http script copy: "
"
2010/02/25 23:34:13  27985#0: *18 http script copy: "Connection: close
"
2010/02/25 23:34:13  27985#0: *18 http proxy header: "User-Agent: Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.9.1.8) Gecko/20100214 Ubuntu/9.10 (karmic) Firefox/3.5.8"
2010/02/25 23:34:13  27985#0: *18 http proxy header: "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
2010/02/25 23:34:13  27985#0: *18 http proxy header: "Accept-Language: ru,en-us;q=0.7,en;q=0.3"
2010/02/25 23:34:13  27985#0: *18 http proxy header: "Accept-Encoding: gzip,deflate"
2010/02/25 23:34:13  27985#0: *18 http proxy header: "Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7"
2010/02/25 23:34:13  27985#0: *18 http proxy header: "Cookie: USERID=82.91.181.26.1257838823.792896.8d11b5c9; __utma=10574126.856157257.1257838828.1265882875.1266598370.4; __utmz=10574126.1257838828.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)"
2010/02/25 23:34:13  27985#0: *18 http proxy header: "Cache-Control: max-age=0"
2010/02/25 23:34:13  27985#0: *18 http proxy header:
"GET /rpc/rpcproxy.dll HTTP/1.0
Host: imap.site.ua
X-Real-IP: 10.100.20.4
X-Forwarded-For: 10.100.20.4
Connection: close
User-Agent: Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.9.1.8) Gecko/20100214 Ubuntu/9.10 (karmic) Firefox/3.5.8
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: ru,en-us;q=0.7,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7
Cookie: USERID=82.91.181.26.1257838823.792896.8d11b5c9; __utma=10574126.856157257.1257838828.1265882875.1266598370.4; __utmz=10574126.1257838828.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
Cache-Control: max-age=0

"
2010/02/25 23:34:13  27985#0: *18 http cleanup add: 081614D0
2010/02/25 23:34:13  27985#0: *18 get rr peer, try: 1
2010/02/25 23:34:13  27985#0: *18 socket 28
2010/02/25 23:34:13  27985#0: *18 epoll add connection: fd:28 ev:80000005
2010/02/25 23:34:13  27985#0: *18 connect to 10.1.100.154:80, fd:28 #19
2010/02/25 23:34:13  27985#0: *18 http upstream connect: -2
2010/02/25 23:34:13  27985#0: *18 event timer add: 28: 60000:118361356
2010/02/25 23:34:13  27985#0: *18 http finalize request: -4, "/rpc/rpcproxy.dll?" a:1, c:2
2010/02/25 23:34:13  27985#0: *18 http request count:2 blk:0
2010/02/25 23:34:13  27985#0: *18 post event B77AA2E0
2010/02/25 23:34:13  27985#0: *18 delete posted event B77AA2E0
2010/02/25 23:34:13  27985#0: *18 http run request: "/rpc/rpcproxy.dll?"
2010/02/25 23:34:13  27985#0: *18 http upstream check client, write event:1, "/rpc/rpcproxy.dll"
2010/02/25 23:34:13  27985#0: *18 http upstream recv(): -1 (11: Resource temporarily unavailable)
2010/02/25 23:34:13  27985#0: *18 post event B77AA314
2010/02/25 23:34:13  27985#0: *18 delete posted event B77AA314
2010/02/25 23:34:13  27985#0: *18 http upstream request: "/rpc/rpcproxy.dll?"
2010/02/25 23:34:13  27985#0: *18 http upstream send request handler
2010/02/25 23:34:13  27985#0: *18 http upstream send request
2010/02/25 23:34:13  27985#0: *18 chain writer buf fl:1 s:659
2010/02/25 23:34:13  27985#0: *18 chain writer in: 081614EC
2010/02/25 23:34:13  27985#0: *18 writev: 659
2010/02/25 23:34:13  27985#0: *18 chain writer out: 00000000
2010/02/25 23:34:13  27985#0: *18 event timer del: 28: 118361356
2010/02/25 23:34:13  27985#0: *18 event timer add: 28: 360000:118661360
2010/02/25 23:34:13  27985#0: *18 post event B787B314
2010/02/25 23:34:13  27985#0: *18 post event B77AA314
2010/02/25 23:34:13  27985#0: *18 delete posted event B77AA314
2010/02/25 23:34:13  27985#0: *18 http upstream request: "/rpc/rpcproxy.dll?"
2010/02/25 23:34:13  27985#0: *18 http upstream dummy handler
2010/02/25 23:34:13  27985#0: *18 delete posted event B787B314
2010/02/25 23:34:13  27985#0: *18 http upstream request: "/rpc/rpcproxy.dll?"
2010/02/25 23:34:13  27985#0: *18 http upstream process header
2010/02/25 23:34:13  27985#0: *18 malloc: 08175078:4096
2010/02/25 23:34:13  27985#0: *18 recv: fd:28 27 of 4096
2010/02/25 23:34:13  27985#0: *18 http proxy status 503 "503 Must use POST"
2010/02/25 23:34:13  27985#0: *18 recv: fd:28 0 of 4069
2010/02/25 23:34:13  27985#0: *18 upstream prematurely closed connection while reading response header from upstream, client: 10.100.20.4, server: imap.site.ua, request: "GET /rpc/rpcproxy.dll HTTP/1.1", upstream: "http://10.1.100.154:80/rpc/rpcproxy.dll", host: "imap.site.ua"
2010/02/25 23:34:13  27985#0: *18 http next upstream, 2
2010/02/25 23:34:13  27985#0: *18 free rr peer 1 4
2010/02/25 23:34:13  27985#0: *18 finalize http upstream request: 502
2010/02/25 23:34:13  27985#0: *18 finalize http proxy request
2010/02/25 23:34:13  27985#0: *18 free rr peer 0 0
2010/02/25 23:34:13  27985#0: *18 close http upstream connection: 28
2010/02/25 23:34:13  27985#0: *18 event timer del: 28: 118661360
2010/02/25 23:34:13  27985#0: *18 http finalize request: 502, "/rpc/rpcproxy.dll?" a:1, c:1
2010/02/25 23:34:13  27985#0: *18 http special response: 502, "/rpc/rpcproxy.dll?"
2010/02/25 23:34:13  27985#0: *18 http set discard body
2010/02/25 23:34:13  27985#0: *18 HTTP/1.1 502 Bad Gateway
Server: nginx/0.8.33
Date: Thu, 25 Feb 2010 21:34:13 GMT
Content-Type: text/html
Content-Length: 173
Connection: keep-alive
Keep-Alive: timeout=20

2010/02/25 23:34:13  27985#0: *18 write new buf t:1 f:0 08161604, pos 08161604, size: 181 file: 0, size: 0
2010/02/25 23:34:13  27985#0: *18 http write filter: l:0 f:0 s:181
2010/02/25 23:34:13  27985#0: *18 http output filter "/rpc/rpcproxy.dll?"
2010/02/25 23:34:13  27985#0: *18 http copy filter: "/rpc/rpcproxy.dll?"
2010/02/25 23:34:13  27985#0: *18 http postpone filter "/rpc/rpcproxy.dll?" 0816177C
2010/02/25 23:34:13  27985#0: *18 write old buf t:1 f:0 08161604, pos 08161604, size: 181 file: 0, size: 0
2010/02/25 23:34:13  27985#0: *18 write new buf t:0 f:0 00000000, pos 080C4000, size: 120 file: 0, size: 0
2010/02/25 23:34:13  27985#0: *18 write new buf t:0 f:0 00000000, pos 080C2FC0, size: 53 file: 0, size: 0
2010/02/25 23:34:13  27985#0: *18 http write filter: l:1 f:0 s:354
2010/02/25 23:34:13  27985#0: *18 http write filter limit 0
2010/02/25 23:34:13  27985#0: *18 malloc: 081629F8:16384
2010/02/25 23:34:13  27985#0: *18 SSL buf copy: 181
2010/02/25 23:34:13  27985#0: *18 SSL buf copy: 120
2010/02/25 23:34:13  27985#0: *18 SSL buf copy: 53
2010/02/25 23:34:13  27985#0: *18 SSL to write: 354
2010/02/25 23:34:13  27985#0: *18 SSL_write: 354
2010/02/25 23:34:13  27985#0: *18 http write filter 00000000
2010/02/25 23:34:13  27985#0: *18 http copy filter: 0 "/rpc/rpcproxy.dll?"
2010/02/25 23:34:13  27985#0: *18 http finalize request: 0, "/rpc/rpcproxy.dll?" a:1, c:1
2010/02/25 23:34:13  27985#0: *18 set http keepalive handler
2010/02/25 23:34:13  27985#0: *18 http close request
2010/02/25 23:34:13  27985#0: *18 http log handler
2010/02/25 23:34:13  27985#0: *18 free: 08175078
2010/02/25 23:34:13  27985#0: *18 free: 081609F0, unused: 4480
2010/02/25 23:34:13  27985#0: *18 event timer add: 27: 75000:118376362
2010/02/25 23:34:13  27985#0: *18 free: 08122968
2010/02/25 23:34:13  27985#0: *18 free: 081601E8
2010/02/25 23:34:13  27985#0: *18 hc free: 00000000 0
2010/02/25 23:34:13  27985#0: *18 hc busy: 00000000 0
2010/02/25 23:34:13  27985#0: *18 free: 081629F8
2010/02/25 23:34:13  27985#0: *18 tcp_nodelay

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




Подробная информация о списке рассылки nginx-ru