I have an apache proxy server used to redirect my HTTP website to different servers. Everything works well for HTTP websites.

I have an Exchange Server 2013 and I would like to access OWA (https://my.domain.com/owa) from internet through my apache proxy server but I have this 502 error message when I try to access the URL:

proxy 502 error message

Here is my virtual host configuration:

<VirtualHost *:*>

    ServerName my.domain.com
    DocumentRoot /var/www/html

    SSLEngine on
    SSLProxyEngine on
    SSLCertificateFile /var/www/certs/webmail.crt
    SSLCertificateKeyFile /var/www/certs/webmail.key

    ProxyRequests Off
    ProxyPreserveHost on
    ProxyPass /
    ProxyPassReverse /

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

Here is my /var/log/apache2/error.log:

[Wed Jan 31 17:13:12.992025 2018] [proxy_http:error] [pid 15213:tid 140120288065280] (103)Software caused connection abort: [client 80.12.xx.xxx:55964] AH01102: error reading status line from remote server

[Wed Jan 31 17:13:12.992179 2018] [proxy:error] [pid 15213:tid 140120288065280] [client 80.12.xx.xxx:55964] AH00898: Error reading from remote server returned by /owa

Can you please help me to understand ?

Many thanks

  • Maybe this is a duplicate of serverfault.com/questions/185894/…
    – Garstlig
    Jan 31, 2018 at 16:53
  • Even if you succeed with this particular problem, you are out of luck. OWA uses NTLM authentication, which violates HTTP statelessness (assumes it is stateful) and properly designed HTTP software, adhering to standards, like Apache isn't able to proxy it. You need some quirks. To my knowledge, commercial Nginx has such a module, but I didn't tried it. I succeeded with Caddy server, which is capable to reverse proxy OWA, but it's NTLM reverse proxy module isn't standard, so you'll need a custom build. Jun 22 at 17:38

2 Answers 2


You may want to have a look here:

  • 1
    Please provide at least the main points in the answer here as text instead of only external links. Jan 31, 2018 at 17:14

Increasing timeouts by adding timeout=7200 to the ProxyPass directive helped in my case:

ProxyPass / timeout=7200

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.