0

我有一个散居地。问题是,当我启用聊天并运行命令./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为我的散居区设置聊天服务器?

4

1 回答 1

0

您不应该直接从端口 3000 使用 diaspora。使用反向代理。

将您的网络服务器设置为反向代理,以将数据从 /http-bind 请求中继到 tcp/5280,并将所有其他请求中继到 tcp/3000。

如果您使用 apache2,这可能会有所帮助:https ://gist.github.com/jhass/719014 (另请阅读评论)

于 2016-04-28T20:00:23.677 回答