ejabberd没有解析多个域名

时间:2015-03-16 07:40:43

标签: configuration ejabberd

意图:使用单个Ubuntu主机托管多个聊天服务器。

OS: Ubuntu 14.04
Server: ejabberd

我有一个静态IP,并且正在我的内部(公司)网络上的VirtualBox上运行Ubuntu VM,并且我已将所有jabber流量端口转发到运行ejabberd服务器的这台Ubuntu机器。

我也有一些域名:让我们称呼它们,example.com,example.net和example.org。我添加了像chat.example.com,chat.example.net和chat.example.org这样的A记录,并将它们指向我的静态IP地址,然后我的路由器将它们转发到运行ejabberd的Ubuntu VM服务器。几天前又添加了这些A记录。

我还更新了ejabberd配置文件,以反映管理员用户和域名,如下所示:

%% Admin user
{acl, admin, {user, "najeeb", "chat.example.com"}}.
{acl, admin, {user, "najeeb", "chat.example.net"}}.
{acl, admin, {user, "najeeb", "chat.example.org"}}.

%% Hostname
{hosts, ["localhost", "chat.example.com", "chat.example.net","chat.example.org"]}.

我还使用ejabberdctl命令行实用程序成功地将几个用户(包括用户" najeeb")添加到上面列出的每个域中。

虽然我可以使用凭证najeeb@chat.example.com连接到ejabberd,但我无法连接到其他聊天域,例如najeeb@chat.example.net或najeeb@chat.example.org。 (我使用Pandion作为我的客户端。)但是,当我将Pandion客户端中的连接设置切换到我的IP地址(作为主机)时,连接正常。

我还尝试将这样的条目添加到我的/ etc / hosts文件中,如下所示:

127.0.0.1       localhost
127.0.1.1       example.com     myhost # myhost is my Ubuntu hostname
127.0.0.1       chat.example.com
127.0.0.1       example.net
127.0.0.1       chat.example.net
127.0.0.1       example.org
127.0.0.1       chat.example.org

尽我所能解决这个问题,但它根本就没有了。

感谢。

1 个答案:

答案 0 :(得分:0)

正如您所说,使用IP地址可以成功连接到每个域,我们认为您的网络配置不正确。您的/ etc / hosts似乎没有被正确考虑。

请注意,您有一行显示127.0.1.1,另一行显示127.0.0.1。

你确定这是正确的吗?

相关问题