Rails диаспора XMPP чат

У меня есть стручок диаспоры. Проблема в том, когда я включил чат и запустил команду ./script/serverмоя система чата возвращает сообщение об ошибке следующим образом:

http://localhost:3000/http-bind 404 (Not Found)

Следующим были мои diaspora.yml конфигурации:

server: ## Section

      # Start built-in XMPP server (default=true).
      # In case you want to run your own server, you should disable it.
      enabled: false

      # Set the directory in which to look for virtual hosts TLS certificates.
      # Check documentation on how to generate or configure your existing
      # certficates correctly:
      #
      # https://wiki.diasporafoundation.org/Vines#Certificates
      certs: 'config/vines'

      # The server accepts by default only valid certificates.
      # Any connection which uses self-signed ones will be closed.
      # If you'd like to accept self-signed certificates
      # on your server, set the next option to true.
      accept_self_signed: true

      # Only edit the next option if you'd like to deny
      # your users to exchange messages between other XMPP servers.
      cross_domain_messages: false

      # Set the maximum of offline messages stored per user (default=150).
      # If it exceeds, it will start deleting old messages. You can disable
      # offline message support completely by setting the option to zero.
      max_offline_msgs: 150

      ## Client to server
      c2s: ## Section

        # Configure the address that vines should listen on.
        address: '0.0.0.0'

        # Configure the client-to-server port.
        # If your server is behind a router or firewall
        # check documentation on how to forward ports:
        #
        # https://wiki.diasporafoundation.org/Vines#Firewall_Ports
        port: 5222

        # The maximum we'd like to allow for stanza size.
        max_stanza_size: 65536

        # The max_resources_per_account attribute, limits how many
        # concurrent connections one user can have to the server.
        max_resources_per_account: 5

      ## Server to server
      s2s: ## Section

        # Configure the address that vines should listen on.
        address: '0.0.0.0'

        # Configure the server-to-server port.
        # If your server is behind a router or firewall
        # check documentation on how to forward ports:
        #
        # https://wiki.diasporafoundation.org/Vines#Firewall_Ports
        port: 5269

        # The max_stanza_size attribute should be
        # much larger than the setting for client-to-server.
        max_stanza_size: 131072

        # By default every XMPP server with a valid certificate
        # is able to communicate with your server. In case of a
        # malicious server (e.g. spam reason), you can black-list them.
        blacklist:
         - 'example.com'
         - 'malicous.net'

      ## XEP-0124 BOSH requests
      bosh: ## Section

        # If you'd like to use a proxy, you should set the proxy
        # option to true, otherwise jsxc always tries to
        # connect directly to the port specified below.
        proxy: true

        # Configure the address that vines should listen on.
        address: '0.0.0.0'

        # Configure the BOSH port.
        port: 5280

        # Configure the bind endpoint.
        bind: '/http-bind'

        # The maximum we'd like to allow for stanza size.
        max_stanza_size: 65536

        # The max_resources_per_account attribute, limits how many
        # concurrent connections one user can have to the server.
        max_resources_per_account: 5

Как мне настроить XMPP сервер чата для моей диаспоры?

1 ответ

Вы не можете использовать диаспору непосредственно из порта 3000. Используйте обратный прокси.

Настройте свой веб-сервер на обратный прокси-сервер для ретрансляции данных из /http-bind запросов в tcp/5280 и всех других запросов в tcp/3000.

Если вы используете apache2, это может помочь: https://gist.github.com/jhass/719014 (см. Также комментарии)

Другие вопросы по тегам