0
votes

I'm using HAproxy as a reverse proxy. In my HAproxy, I have defined an backend as below

backend be_server
  mode http
  balance leastconn
  server server1 host1:port1

on host1:port1, I have an application listening but this application is not running on a web server. When a request comes to my frontend in HAproxy and when it gets routed to the backend, I see the following error message in HAproxy logs

be_server.srvrep[00cb:00cc]: HTTP/1.1 404 Not Found

it says the server not found while my application is running on that host and port and if I curl it directly (without HAproxy)it responds. Is this because problem because HAproxy tried to make a connection with a Web Server first and because I don't have an actual web server it fails? What is the solution here? Should I replace the backend with a http-request redirect?

1

1 Answers

0
votes

If your application is not running on a web server, try with HAProxy mode tcp.