0

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 / https://192.168.1.50/
    ProxyPassReverse / https://192.168.1.50/

    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 192.168.1.50:443

[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

T.G
  • 1
  • 1
  • 1
  • Maybe this is a duplicate of https://serverfault.com/questions/185894/proxy-error-502-reason-error-reading-from-remote-server-with-apache-2-2-3-de#237485 – Garstlig Jan 31 '18 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. – Nikita Kipriyanov Jun 22 '22 at 17:38

2 Answers2

0

You may want to have a look here:

Garstlig
  • 1
  • 2
0

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

ProxyPass / https://192.168.1.50/ timeout=7200
Garstlig
  • 1
  • 2