Using Apache as a reverse proxy HTTPS server in front of Remote Desktop Gateway server

Solution 1:

Unfortunately, RPC-over-HTTP compatibility in Apache looks like a "will not fix". Its behavior doesn't jive with how mod_proxy handles communication, and they aren't inclined to bend over backwards for Microsoft's non-standard HTTP behavior.

See here. Highlight:

If it fails to comply with HTTP, it isn't HTTP, and the ASF HTTP Server project is unlikely to pay attention; particularly if it masquerades as HTTP and is not.

[snip]

In the interim, after lengthy consideration, this is not an httpd proxy flaw.

If there's no other reason that you were looking at Apache specifically, maybe look into an alternative - HAProxy may be a good fit?

Solution 2:

At least, we've found a solution for RPC-over-HTTP compatibility in Apache https://github.com/bombadil/mod_proxy_msrpc

It works with Outlook and MS RDS (Remote Desktop Services) on WindowsServer2012R2

Many thanks to author Micha Lenk aka bombadil!