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

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

</VirtualHost>

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 ?

share|improve this question

3 Answers 3

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

share|improve this answer

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.

share|improve this answer
ProxyPass / https://localhost:1234/
ProxyPassReverse / https://localhost:1234/

Try that instead. Slashes matching is important.

share|improve this answer
1  
Hello, same error with slashes. –  bux Jan 3 '12 at 17:30
1  
Ok. Is the service on port 1234 actually listening on IPv6? Try 127.0.0.1 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 (127.0.0.1) then it'll really fail. Probably just turn off SSLProxyCheckPeerCN. –  Shane Madden Jan 3 '12 at 17:40
    
"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 Jan 3 '12 at 18:30
    
didn't helped for me, any other ideas? –  childno.de Dec 19 '12 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. –  Shane Madden Dec 19 '12 at 2:06

Your Answer

 
discard

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.