如何公开访问 RabbitMq [英] How to access RabbitMq publicly

查看:50
本文介绍了如何公开访问 RabbitMq的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了 &在 Centos 远程服务器上设置 Rabbitmq.后来我创建了一个文件rabbitmq.config"并添加了这一行

<块引用>

[{兔子,[{loopback_users,[]}]}]

然后重启rabbitmq服务器.再次尝试使用访客凭据从我的本地计算机登录 rabbitmq 管理 Web 界面,但得到 <块引用>

登录失败

错误消息.在 Centos 中清空 Rabbitmq 的环回用户设置的正确方法是什么.

解决方案

首先使用ssh客户端连接到你的rabbitmq服务器机器,以便能够运行rabbitmqctl (like puTTY) &进入rabbit安装的sbin目录

  1. 您需要为该系统上的任何 vhost 创建一个用户(这里我使用默认 vhost "/")

$ rabbitmqctl add_user yourName yourPass

  1. 为该用户设置默认虚拟主机的权限

$ rabbitmqctl set_permissions -p/yourName ".*" ".*" ".*"

  1. 为该用户设置管理员标签(使他能够访问管理插件)

$ rabbitmqctl set_user_tags yourName 管理员

...您已准备好使用 yourNameyourPass 从任何浏览器将其指向 http://登录到您的 rabbitmq 管理 gui*********":15672 其中 ***** 是您的服务器 IP希望对您有所帮助...

:-)

I have installed & setup the Rabbitmq on Centos remote server. Later I created an file "rabbitmq.config" and added the line

[{rabbit, [{loopback_users, []}]}]

and then restarted the rabbitmq server. Again tried to login the rabbitmq management web interface from my local machine using the guest credentials, but getting

login failed

error message.What is the proper way to empty the loopback user settings for Rabbitmq in Centos.

解决方案

First of all connect to your rabbitmq server machine using ssh client so as to be able to run rabbitmqctl (like puTTY) & get into the sbin directory of rabbit installation

  1. you need to create a user for any vhost on that system (here I use default vhost "/")

$ rabbitmqctl add_user yourName yourPass

  1. Set the permissions for that user for default vhost

$ rabbitmqctl set_permissions -p / yourName ".*" ".*" ".*"

  1. Set the administrator tag for this user (to enable him access the management pluggin)

$ rabbitmqctl set_user_tags yourName administrator

... and you are ready to login to your rabbitmq management gui using yourName and yourPass from any browser by pointing it to http://"*********":15672 where ***** is your server IP hope it helps...

:-)

这篇关于如何公开访问 RabbitMq的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆