Question

I use node.js and socket.io.

I have an application that runs on the IP address: 31.31.69.79:3000

I have a domain name: zkus.eu - I want to redirect this domain to this ip: 31.31.69.79:3000

How do I set haproxy config (haproxy.cfg)?

Was it helpful?

Solution

There are several examples on the haproxy site: http://haproxy.1wt.eu/download/1.4/doc/configuration.txt

That said, a fairly minimal config (taken from the examples on that page) is:

global
    daemon
    maxconn 256

defaults
    mode http
    timeout connect 5000ms
    timeout client 50000ms
    timeout server 50000ms

listen http-in
    bind *:80
    server server1 127.0.0.1:3000 maxconn 32
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top