On the main page of my website multiple http requests are made on different domains (brin.gr, static.brin.gr and gateway.brin.gr). Sometimes everything's fine, sometimes the http request to gateway.brin.grreturns 502.
I've started HAProxy in debug mode and found out that the 502 error occur when the request is done on the wrong backend (the request is done on default backend "nginx" instead of "gateway"), see http://pastebin.com/yHHkJpcX. So it seems to be a configuration issue. FYI Gateway.brin.gr is process that act as an http server and a websocket server and runs on the local port 8080. Here is the configuration file: http://pastebin.com/ddmDzZLG You can try accessing http://brin.gr by yourself and see that sometimes the request gateway.brin.gr will throw a 502 error. What did I do wrong ? Thanks a lot for your time.

