Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RabbitMQ managment Nginx proxy

Tags:

nginx

rabbitmq

I have loadbalancer and vm with rabbitmq broker. On rabbitmq open 5672 port with plugin managment if I am create proxy to rabbitmq recive

curl: (52) Empty reply from server

I am can connect with telnet to rmq server and have callback

curl: (56) Recv failure: Connection reset by peer

Nginx config

server {
    listen    xxx.xxx.xxx.yy:80;
    server_name xxxxxxxxxx
    access_log acces.log;
    error_log error.log;
    location / {
            client_body_buffer_size 128k;
            proxy_send_timeout   90;
            proxy_read_timeout   90;
            proxy_buffer_size    4k;
            proxy_buffers     16 32k;
            proxy_busy_buffers_size 64k;
            proxy_temp_file_write_size 64k;
            proxy_connect_timeout 30s;
            proxy_pass   http://xxx.xxx.xxx.xx:5672;
            proxy_set_header   Host   $host;
            proxy_set_header   X-Real-IP  $remote_addr;
            proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}
like image 730
Rinat Mukhamedgaliev Avatar asked Jan 16 '13 09:01

Rinat Mukhamedgaliev


People also ask

Does nginx support AMQP?

You can try and proxy to tcp, installing a tcp-proxy module for nginx to work with AMQP.

How do I access RabbitMQ management?

Open the RabbitMQ management console, http://localhost:15672 . Login as a guest. Enter guest as the Username and Password. Note: The default user “guest” is an administrative user and its login credentials are published on the official RabbitMQ web site.

Does RabbitMQ have a UI?

Overview. The RabbitMQ management plugin provides an HTTP-based API for management and monitoring of RabbitMQ nodes and clusters, along with a browser-based UI and a command line tool, rabbitmqadmin. It periodically collects and aggregates data about many aspects of the system.


1 Answers

Oh, I am mistaken the port for management plugin, it's 15672, not 5672. All good

server {
    listen    xxx.xxx.xxx.yy:80;
    server_name xxxxxxxxxx
    access_log acces.log;
    error_log error.log;
    location / {
        client_body_buffer_size 128k;
        proxy_send_timeout   90;
        proxy_read_timeout   90;
        proxy_buffer_size    4k;
        proxy_buffers     16 32k;
        proxy_busy_buffers_size 64k;
        proxy_temp_file_write_size 64k;
        proxy_connect_timeout 30s;
        proxy_pass   http://xxx.xxx.xxx.xx:15672;
        proxy_set_header   Host   $host;
        proxy_set_header   X-Real-IP  $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}
like image 111
Rinat Mukhamedgaliev Avatar answered Sep 29 '22 00:09

Rinat Mukhamedgaliev