HAProxy community

Simple http:port forwarding?


So currently I am using HAproxy to forward incoming RTMP to a container I created on Ubuntu.
I am using mode tcp in defaults.

Now I also want to forward an http request that comes in on a specific port to the same container with the same port #. Can I declare two modes in the haproxy.cfg? So mode tcp and mode http?




Different port on the frontend, same backend port? Just configure duplicates with appropriate modificationsa.


I will use the same port on front and back. I’m confused on how to set haproxy.cfg? The backend will be a Ubuntu LXD container on the same server.


Can you make specfic examples using actual port numbers because it is unclear what you are trying to do.


Ok I have an Ubuntu 16.04 server. I have an LXD container. I have an incoming http request on port 8935.
I want to forward it to the container IP on same port.



Just add something like this. There is no specific issue with what you are trying to achieve, just do it.

 bind :8935
 server server1

If you want more specific advise, you need to actually share your current configuration.