【问题标题】:crossdomain.xml not found in ejabberd [closed]在 ejabberd 中找不到 crossdomain.xml [关闭]
【发布时间】:2012-02-09 19:16:28
【问题描述】:

我已经配置了 ejabberd 服务器,但是我无法访问http://www.example.com:5280/crossdomain.xml

我在 ejabberd.cfg 中设置了以下参数

监听器

{5280, ejabberd_http, [
                        {access,all},
                         {request_handlers,
                          [
                           {["pub", "archive"], mod_http_fileserver},
                           {["xmpp-http-bind"], mod_http_bind}
                         ]},
%%                       captcha,
                         http_bind,
                         http_poll,
                         register,
                         web_admin
                        ]}

模块

  {mod_http_fileserver, [
                        {docroot, "/var/log/ejabberd/"},
                        {accesslog, "/var/log/ejabberd/access.log"},
                         {content_types,[{".xml, text/xml"}]}
                      ]},

crossdomain.xml 存在于 centos "/var/log/ejabberd/" 中的此路径

谁能帮忙解决这个问题,我听说crossdomain.xml我们也可以配置apache webserver,但我不知道怎么做?

【问题讨论】:

  • 你是怎么解决这个问题的?我有点面临类似的情况,无法将 /crossdomain.xml 链接到文件..有什么帮助吗?
  • 人们投票关闭它,因为它与服务器配置有关。如果它被关闭,请尝试 serverfault.com!

标签: xmpp cross-domain ejabberd


【解决方案1】:

我猜你正在使用带有 ejabberd 的 Strophe。 crossdomain.xml 与 ejabberd 无关,它与配置 flash 以执行跨域请求有关。 当然,您不需要闪存,最好通过在前面使用代理来完全避免这种情况。您可以使用 apache 或 nginx 或任何其他。 Here是nginx的教程。

【讨论】:

  • 如果我使用 apache 来设置代理,那么我是否需要查询 apache 网络服务器以获取 BOSH 服务 url,即 example.com:5280/xmpp-http-bind 或仅 ejabber?
  • Apache 会将 example.com:80/http-bind 代理到 example.com:5280/http-bind
  • 你知道如何在apache中设置吗?
  • 看看 mod_rewrite 或 mod_proxy 取决于你想做什么。没有努力就没有学习。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-12-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多