I'm trying to enable proxy virtualhost:

<VirtualHost *:80>

  ServerName xxxxx.domain.tdl
  SSLProxyEngine On
  SSLProxyCheckPeerCN on

  ProxyPass / https://localhost:1234
  ProxyPassReverse / https://localhost:1234


But i've an 500 err and my error.log (apache2) display:

[Tue Jan 03 15:41:42 2012] [error] (502)Unknown error 502: proxy: pass request body failed to [::1]:1234 (localhost)

[Tue Jan 03 15:41:42 2012] [error] proxy: pass request body failed to [::1]:1234 (localhost) from 82.252.xxx.xx ()

Missing some parameters ?

3 Answers 3

ProxyPass / https://localhost:1234/
ProxyPassReverse / https://localhost:1234/

Try that instead. Slashes matching is important.

  • 1
    Hello, same error with slashes.
    – bux
    Commented Jan 3, 2012 at 17:30
  • 6
    Ok. Is the service on port 1234 actually listening on IPv6? Try instead of localhost. Also, what's the subject name of the certificate on that port? If it's not an exact match with that hostname, the connect will fail - and if you make the change to force IPv4 localhost ( then it'll really fail. Probably just turn off SSLProxyCheckPeerCN. Commented Jan 3, 2012 at 17:40
  • 1
    "Probably just turn off SSLProxyCheckPeerCN": Yes, it's working now =). But now the service behind localhost:1234 throw an error about cookies :/ (Your browser does not support cookies, which are required for this web server to work in session authentication mode) I think its the ProxyPass, service work fine without it.
    – bux
    Commented Jan 3, 2012 at 18:30
  • didn't helped for me, any other ideas? Commented Dec 19, 2012 at 0:01
  • @childno.de It'd be best if you open a new question with your specific configuration and log entries so that we can take a look at that. Commented Dec 19, 2012 at 2:06

If the browser is setting the cookies for xxxxx.domain.tdl and the server is returning them for localhost or a locally defined domain, you might have a mismatch. You can use ProxyPassReverseCookieDomain to rewrite the cookies.

Since they're both on /, you probably won't need ProxyPassReverseCookiePath.


Use instead of localhost, probably your app is not running IPv6

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .