0

I'm having a problem getting my Exchange Server to work with mod_proxy. This is my current VirtualHost config:

<VirtualHost *:80>
ServerName mail.example.com
ServerAlias www.mail.example.com
ProxyPass         /  http://localhost:446/
ProxyPassReverse  /  http://localhost:446/
ProxyRequests     Off
</VirtualHost>

I set IIS to listen for HTTPS on port 446. But when I try to connect to mail.example.com it just loads forever. The reason why I want it to proxy is to setup HTTPS on our main domain. We previously had it setup that the HTTPS would go to Exchange directly (from our root domain). If you want more config files just ask. We are running Windows Server 2012 and the latest Xampp.

As requested, the Error.log from Apache:

[Thu Oct 16 04:43:08.921973 2014] [core:warn] [pid 10340:tid 348] AH00098: pid file B:/Xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Thu Oct 16 04:43:09.140744 2014] [ssl:warn] [pid 10340:tid 348] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Thu Oct 16 04:43:09.195432 2014] [mpm_winnt:notice] [pid 10340:tid 348] AH00455: Apache/2.4.10 (Win32) OpenSSL/1.0.1i PHP/5.5.15 configured -- resuming normal operations
[Thu Oct 16 04:43:09.195432 2014] [mpm_winnt:notice] [pid 10340:tid 348] AH00456: Apache Lounge VC11 Server built: Jul 17 2014 11:50:08
[Thu Oct 16 04:43:09.195432 2014] [core:notice] [pid 10340:tid 348] AH00094: Command line: 'b:\\xampp\\apache\\bin\\httpd.exe -d B:/Xampp/apache'
[Thu Oct 16 04:43:09.197320 2014] [mpm_winnt:notice] [pid 10340:tid 348] AH00418: Parent: Created child process 18308
[Thu Oct 16 04:43:10.204176 2014] [ssl:warn] [pid 18308:tid 412] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Thu Oct 16 04:43:10.258860 2014] [mpm_winnt:notice] [pid 18308:tid 412] AH00354: Child: Starting 150 worker threads.

Thanks for the help and sorry if this has been asked before.

EDIT I'm now using the following block. But I can't seem to bind to the HTTPS port (443)

<VirtualHost *:80>
ServerName mail.example.com
ServerAlias www.mail.example.com
SSLProxyEngine on
RequestHeader set Front-End-Https "On"
SSLProxyVerify none 
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
ProxyPass         /  https://localhost:446/
ProxyPassReverse  /  https://localhost:446/
ProxyRequests     On
ProxyPreserveHost On
</VirtualHost>
noahp78
  • 161
  • 3
  • Do you get anything in your Apache access or error logs? Likewise for IIS. – Ladadadada Oct 16 '14 at 11:40
  • Doesn't look like they have anything intressting (Apache Access Logs, IIS logs, Apache Error Logs). The proxy now gives a "Error reading from remote server) – noahp78 Oct 16 '14 at 11:49
  • That sounds like a firewall issue in between Apache and IIS to me. Once you actually make requests to IIS it will probably log a 400 response because you will be talking http to a server expecting https. – Ladadadada Oct 16 '14 at 11:52

1 Answers1

0

So the 446 is actually the https port, but apache thiks it's a plain http port. That's one issue. Second - it's better to use the RewriteRule syntax along with the proxy [P] flag, than these Proxy* rules.

drookie
  • 8,625
  • 1
  • 19
  • 29