Difficulty in Proxying for MS Exchange Web Access using NGINX

Mario F. Arroyo mfarroyo at nexustech.com.ph
Sat Feb 2 18:15:37 MSK 2008

Hi Igor,

Please allow me to thank you for your efforts in coming up and maintaining such a wonderful piece of software! Its fast, stable and light on resources ... truly an amazing piece of work!

I am running the nginx-0.6.25 software on Ubuntu Server 7.10. I was able to set up the web services and proxy them to web sites running PHP-based applications. Finally, I was able to proxy http traffic inside https using nginx. However, I am having difficulty doing the same for the MS Web Service for Exchange.

The weird thing is ... if I connect to http://ns1.nexustech.com.ph/exchange/ ... everything works! Here are the pertinent config entries:

    server {
        listen          80;
        server_name     ns1.nexustech.com.ph;
        access_log      /var/log/nginx/access_http.log main;
        location / {
           proxy_set_header     Host            $http_host;
But if I were to connect using https://ns1.nexustech.com.ph/exchange/ .... I get the connected and everything but some functions do not work properly ... in fact, what seems to happen is that it tries to keep connecting back to the http port ... I have tried enabling proxy_redirect but I can't seem to get the right redirection ...

Anyway, here is the https section:

    server {
        listen       443;
        server_name  ns1.nexustech.com.ph;
        access_log  /var/log/nginx/access_https.log  main;

        ssl                  on;
        ssl_certificate      /etc/ssl/certs/cert.crt;
        ssl_certificate_key  /etc/ssl/private/cert.key;

        location / {
            proxy_set_header    Host               $http_host;

And here are some log entries from the access_https.log: - - [02/Feb/2008:22:52:17 +0800] GET /exchange? HTTP/1.1 "401" 83 "-" "RPT-HTTPClient/0.3-3E" "-" - - [02/Feb/2008:22:52:17 +0800] GET /exchange? HTTP/1.1 "401" 83 "-" "RPT-HTTPClient/0.3-3E" "-"

And from the access_http.log: - mario [02/Feb/2008:23:08:02 +0800] POST /exchange/mfarroyo/Drafts/Difficulty%20in%20Proxying%20for%20MS%20Exchange%20Web%20Access%20using%20NGINX.EML HTTP/1.1 "302" 0 "http://ns1.nexustech.com.ph/exchange/mfarroyo/Drafts/Difficulty%20in%20Proxying%20for%20MS%20Exchange%20Web%20Access%20using%20NGINX.EML?Cmd=edit" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20071204 Ubuntu/7.10 (gutsy) Firefox/" "-" - mario [02/Feb/2008:23:08:03 +0800] GET /exchange/mfarroyo/Drafts/Difficulty%20in%20Proxying%20for%20MS%20Exchange%20Web%20Access%20using%20NGINX.EML?Cmd=edit HTTP/1.1 "200" 3212 "http://ns1.nexustech.com.ph/exchange/mfarroyo/Drafts/Difficulty%20in%20Proxying%20for%20MS%20Exchange%20Web%20Access%20using%20NGINX.EML?Cmd=edit" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20071204 Ubuntu/7.10 (gutsy) Firefox/" "-"
/var/log/nginx/access_http.log (END) 

Thanks in advance for your help!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20080202/aab2ce87/attachment.html>

More information about the nginx mailing list