Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sometimes I get the following error (in apache's error.log) when viewing my site over https:

(502)Unknown error 502: proxy: pass request body failed to xxx.xxx.xxx.xxx:443

I'm not entirely sure what this is and why it happens, it's also not consistent.

The request route is:

  • Browser
  • Proxy server (apache with mod_proxy + mod_ssl)
  • Load balancer (aws)
  • Web server (apache with mod_ssl)

The configuration on the proxy server is as follows:

<VirtualHost *:443>
    ProxyRequests Off
    ProxyVia On

    ServerName                      www.xxx.co.uk
    ServerAlias                     xxx.co.uk

    <Directory proxy:*>
        Order deny,allow
        Allow from all

    <Proxy *>
        AddDefaultCharset off
        Order deny,allow
        Allow from all

    ProxyPass / balancer://cluster:443/ lbmethod=byrequests
    ProxyPassReverse / balancer://cluster:443/
    ProxyPreserveHost off

    SSLProxyEngine On
    SSLEngine on
    SSLCertificateFile /var/www/vhosts/xxx/ssl/www.xxx.co.uk.cert
    SSLCertificateKeyFile /var/www/vhosts/xxx/ssl/www.xxx.co.uk.key

    <Proxy balancer://cluster>
        BalancerMember https://xxx.eu-west-1.elb.amazonaws.com


Any idea what the issue might be?

share|improve this question
Did you ever solve this? –  ajmurmann Jul 29 '12 at 16:23

1 Answer 1

In my case, the problem was the backend (stunnel) not accepting the SSL version that Apache was sending. I found in syslog that stunnel was reporting "routines:SSL3_GET_RECORD:wrong version number" and then i found the solution in http://serverfault.com/a/303851/69972

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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