Hi guys,
i finally need some help using Nginx as reverse proxy for an Exchange 2010
OWA is working perfectly, certificates is all fine, but active sync with android devices is not working.
here is the Config
==============
server {
listen 443;
server_name owa.mydomain.de;
# Redirect from "/" to "/owa" by default
location / {return 301 https://owa.mydomain.de/owa;}
# Enable SSL
ssl on;
ssl_certificate /etc/nginx/certs/owa.crt;
ssl_certificate_key /etc/nginx/certs/privatekey.pem;
ssl_session_timeout 5m;
# Set global proxy settings
proxy_read_timeout 360;
proxy_connect_timeout 360;
proxy_http_version 1.1;
proxy_pass_request_headers on;
proxy_pass_header Authorization;
proxy_pass_header Date;
proxy_pass_header Server;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "";
location /owa { proxy_pass https://192.168.0.1/owa; }
location /ews { proxy_pass https://192.168.0.1/ews; }
location /rpc { proxy_pass https://192.168.0.1/rpc; }
location /exchweb { proxy_pass https://192.168.0.1/exchweb; }
location /public { proxy_pass https://192.168.0.1/public; }
location /exchange { proxy_pass https://192.168.0.1/exchange; }
location /Microsoft-Server-ActiveSync {
proxy_set_header X-Forwarded-Proto https;
proxy_pass https://192.168.0.1/Microsoft-Server-ActiveSync;
}
error_log /var/log/nginx/exchange-ssl-error.log;
access_log /var/log/nginx/exchange-ssl-access.log;
}
The error log says:
2014/08/15 17:26:31 [error] 16474#0: *239 upstream prematurely closed connection while reading response header from upstream, client: 98.122.1.31, server: owa.mydomain.de, request: "POST /Microsoft-Server-ActiveSync?Cmd=Sync&User=username%5Cda&DeviceId=androidc187814&DeviceType=Android HTTP/1.1", upstream: "https://192.168.0.1:443/Microsoft-Server-ActiveSync?Cmd=Sync&User=username%5Cda&DeviceId=androidc187814&DeviceType=Android", host: "owa.mydomain.de"
I have absolutely no idea what else i can do to fix that. Connecting with the androids directly to the exchange
server works perfectly. When nginx is between, no work :(
Please help! Thanks in advance!
i finally need some help using Nginx as reverse proxy for an Exchange 2010
OWA is working perfectly, certificates is all fine, but active sync with android devices is not working.
here is the Config
==============
server {
listen 443;
server_name owa.mydomain.de;
# Redirect from "/" to "/owa" by default
location / {return 301 https://owa.mydomain.de/owa;}
# Enable SSL
ssl on;
ssl_certificate /etc/nginx/certs/owa.crt;
ssl_certificate_key /etc/nginx/certs/privatekey.pem;
ssl_session_timeout 5m;
# Set global proxy settings
proxy_read_timeout 360;
proxy_connect_timeout 360;
proxy_http_version 1.1;
proxy_pass_request_headers on;
proxy_pass_header Authorization;
proxy_pass_header Date;
proxy_pass_header Server;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "";
location /owa { proxy_pass https://192.168.0.1/owa; }
location /ews { proxy_pass https://192.168.0.1/ews; }
location /rpc { proxy_pass https://192.168.0.1/rpc; }
location /exchweb { proxy_pass https://192.168.0.1/exchweb; }
location /public { proxy_pass https://192.168.0.1/public; }
location /exchange { proxy_pass https://192.168.0.1/exchange; }
location /Microsoft-Server-ActiveSync {
proxy_set_header X-Forwarded-Proto https;
proxy_pass https://192.168.0.1/Microsoft-Server-ActiveSync;
}
error_log /var/log/nginx/exchange-ssl-error.log;
access_log /var/log/nginx/exchange-ssl-access.log;
}
The error log says:
2014/08/15 17:26:31 [error] 16474#0: *239 upstream prematurely closed connection while reading response header from upstream, client: 98.122.1.31, server: owa.mydomain.de, request: "POST /Microsoft-Server-ActiveSync?Cmd=Sync&User=username%5Cda&DeviceId=androidc187814&DeviceType=Android HTTP/1.1", upstream: "https://192.168.0.1:443/Microsoft-Server-ActiveSync?Cmd=Sync&User=username%5Cda&DeviceId=androidc187814&DeviceType=Android", host: "owa.mydomain.de"
I have absolutely no idea what else i can do to fix that. Connecting with the androids directly to the exchange
server works perfectly. When nginx is between, no work :(
Please help! Thanks in advance!