[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?

Hi,

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?

Steps:
apt-get install haproxy

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

global
        maxconn 2000
        user haproxy
        group haproxy
        daemon

listen  http-server 0.0.0.0:80
        mode    http
        balance roundrobin
        contimeout      5000
        clitimeout      50000
        srvtimeout      50000
        server  inst00 127.0.0.1:8000 check inter 2000 fall 3

Change 8000 to whatever port you need, like 55672.

Cheers,
  Marek Majkowski



More information about the rabbitmq-discuss mailing list