Ejabberd + Nextcloud BOSH issue


as per title, I experience an issue with ejabberd and nextcloud xmmp clients (domain.com is an example). Latest nethserver-ejabberd and latest NC15.

When setting the BOSH URL in nextcloud I get:

I can see the webpage https://domain.com/http-bind, and the bosch module is enabled in the ejabberd config file.

Any hints would be appreciated.


ps. I understand a little bit better what is going on. Nextcloud and ejabberd are on the same server, BUT Nextcloud is on a subdomain (sub.domain.com) whilst ejabberd runs on the main domain (domain.com)

Could this be resolved by using the reverse proxy module?

I found this and it is actually what I want to achieve (I think :wink: ). Just need a little help (and reading) to get this done.

@LayLow, how is it going, any progress?

You’re probably right:

BOSH server not reachable

Reason: You are violating the browser same-origin-policy (SOP), which prevents cross-side requests between sites with different domains or ports (protocols).
Test: Open your JavaScript console and look for errors.
Solution 1: Enable CORS for your BOSH server. Enabled by default in ejabberd. If you have a modified content-security-policy (as used in ownCloud), then add your BOSH domain to the default-src section.
Solution 2: Create a proxy as described in our Apache setup guide.

Thanks for the info. Unfortunately I would need some serious handholding (e.g. somebody test it for me) for I lack the skills in this matter.

Lets ask then if someone from the @support_team has done a similar setup or is able to test it.

1 Like

ps. I would opt for reverse proxy, if at all possible, for solution 1 has some browser dependencies.