logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Exchange 2010 EWS Mangled when proxied via 2.4.4
Author
acsheehy



Joined: 05 Apr 2013
Posts: 1
Location: UK, London

PostPosted: Wed 17 Apr '13 9:34    Post subject: Exchange 2010 EWS Mangled when proxied via 2.4.4 Reply with quote

Own Build Apache 2.4.4 (32bit) with IPv6 support Openssl 1.0.1e on Windows Server 2012.

We implemented this as a reverse proxy with Exchange 2010 behind it. We published Webmail out through Apache. Thought it was going well until users reported strange things. Exchange Web Services users were sending email and they arrived having been posted from another user's mailbox. Also, sometimes viewing the mailbox provides a view of somebody else's mailbox.

We checked out the logs on the Exchange CAS server and what appears to be happening is that the body of the post is being sent with the header of another post.

I am freaking out over this because had we fully implemented this it would have been my head.

Does anyone have any idea what is going on?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Tue 23 Apr '13 10:51    Post subject: Reply with quote

Can you please post the config of your reverse proxy?
Back to top
jraute



Joined: 13 Sep 2013
Posts: 188
Location: Rheinland, Germany

PostPosted: Tue 17 Sep '13 15:07    Post subject: Solution for apache reverse proxy / exchange mail sync Reply with quote

Yes, this phenomenon is known, but there is a solution:
(It seems to be some kind of session problem.)
The trick is to use SetEnv proxy-initial-not-pooled

example apache reverse proxy configuration for exchange (OWA, ActiveSync):

Code:

  EnableMMAP Off
  EnableSendfile Off

  AcceptFilter http none
  AcceptFilter https none

<VirtualHost *:443>

[...]

<Location /exchange>
  ProxyPreserveHost On
  ProxyPass http://yourserver/exchange
  ProxyPassReverse http://yourserver/exchange
  SetEnv proxy-initial-not-pooled
  SetEnvIf User-Agent ".*MSIE.*" value BrowserMSIE
  Header unset WWW-Authenticate
  Header add WWW-Authenticate "Basic realm=server.mydomain.com"
  Header append Vary User-Agent env=!dont-vary
</Location>

<Location /exchweb>
  ProxyPreserveHost On
  ProxyPass http://yourserver/exchweb
  ProxyPassReverse http://yourserver/exchweb
  SetEnv proxy-initial-not-pooled
  SetEnvIf User-Agent ".*MSIE.*" value BrowserMSIE
  Header unset WWW-Authenticate
  Header add WWW-Authenticate "Basic realm=server.mydomain.com"
  Header append Vary User-Agent env=!dont-vary
</Location>

<Location /public>
  ProxyPreserveHost On
  ProxyPass http://yourserver/public
  ProxyPassReverse http://yourserver/public
  SetEnv proxy-initial-not-pooled
  SetEnvIf User-Agent ".*MSIE.*" value BrowserMSIE
  Header unset WWW-Authenticate
  Header add WWW-Authenticate "Basic realm=server.mydomain.com"
  Header append Vary User-Agent env=!dont-vary
</Location>

<Location /Microsoft-Server-ActiveSync>
  ProxyPreserveHost On
  ProxyPass http://yourserver/Microsoft-Server-ActiveSync
  ProxyPassReverse http://yourserver/Microsoft-Server-ActiveSync
  SetEnv proxy-initial-not-pooled
  SetEnvIf User-Agent ".*MSIE.*" value BrowserMSIE
  Header unset WWW-Authenticate
  Header add WWW-Authenticate "Basic realm=server.mydomain.com"
  Header append Vary User-Agent env=!dont-vary
</Location>

</VirtualHost>


(i don't know if this is elegant code, but it works!)
Back to top


Reply to topic   Topic: Exchange 2010 EWS Mangled when proxied via 2.4.4 View previous topic :: View next topic
Post new topic   Forum Index -> Apache