[rabbitmq-discuss] rabbitmq-jsonrpc-channel on port 80

Marek Majkowski majek04 at gmail.com
Tue Jun 1 12:25:26 BST 2010

On Tue, Jun 1, 2010 at 08:22, Donovan <donovanhide at gmail.com> wrote:
> I'm trying to set up rabbit_mochiweb to be served on port 80 so that I
> can invoke JSON-RPC methods without any firewall configuration. On
> Lucid Lynx I configure /etc/rabbitmq/rabbitmq.conf:
> [
>    {rabbit_mochiweb, [{port, 80}]}
> ].
> If I change the port to any value above 1023, it works, which makes me
> think this a running as root issue. Any ideas how to make this work?


Rabbitmq is starting as an unprivileged user, so it can't bind to ports
less than 1024. I'd suggest using some intermediate layer for that,
maybe haproxy?

apt-get install haproxy

Edit /etc/default/haproxy to enable it.
Modify config, to something like

        maxconn 2000
        user haproxy
        group haproxy

listen  http-server
        mode    http
        balance roundrobin
        contimeout      5000
        clitimeout      50000
        srvtimeout      50000
        server  inst00 check inter 2000 fall 3

Change 8000 to whatever port you need, like 55672.

  Marek Majkowski

More information about the rabbitmq-discuss mailing list