Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In nginx it is fairly simple to configure it to proxy unix .sock files


upstream bla {
      server unix:///home/sam/Source/bla/tmp/sockets/thin1.sock;
      server unix:///home/sam/Source/bla/tmp/sockets/thin2.sock;

Is there a similar syntax in haProxy to enable balancing local .sock filew

share|improve this question

2 Answers 2

up vote 3 down vote accepted

AFAIK, HAProxy doesn't support it. According to the document, you must specify an IPv4 or IPv6 (or hostname) of the server.

share|improve this answer

As quanta said it need IPv4 address, but with using socat to relay unix scoket to TCP maybe you can use HAProxy to that.

socat TCP-LISTEN:1234,reuseaddr,fork UNIX-CLIENT:/tmp/foo
share|improve this answer
I would change the backend (thin server?) to listen on a TCP socket (localhost:port) instead of Unix socket. –  quanta Aug 15 '12 at 5:05
Yes I agree that it would be the best, but if it can't listen to TCP then you have to trick it to do so. –  Stone Aug 15 '12 at 5:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.