In at least Prosody, the HTTP request used for BOSH should include a Host header that matches the name of the destination virtualhost.
E.g., if we have an XMPP server whose DNS entry is "xmpp.example.com" listening to the virtual host "example.com" (jids like firstname.lastname@example.org) the HTTP host header should be "example.com", not "xmpp.example.com". Using the latter will result in a 404 "Unknown host".
The following patch fixes this; although I haven't verified the behavior with other XMPP servers.
Issue was originally reported at https://github.com/Flowdalic/asmack/issues/76