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;