My current server setup consists of Apache and Ejabberd. Apache acts as a proxy to ejabberd requests.

Now I have included another level where Nginx acts as a proxy image server in front of apache. So Nginx process all requests by defaults and forwards all php requests to apache.

Now I am stuck with the ejabberd polling as it now communicates with nginx first instead of apache, so I keep getting a 502 Bad request.

Ho do I go about this situation.

I tired this in nginx but it does not work

proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:5280;
link|improve this question
I solved this by increasing the proxy_buffer_size to 32K – sheldon Nov 4 '11 at 13:10
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.