EDIT: s/alice.bob.com/alice.example.com/ to fix part of the backstory.
Let's say that you have a server (like Prosody) that has one or more subsystems (like BOSH and Websockets). You want to stick them behind a web server like Nginx so that they can be accessed via HTTP - let's say that you want a browser to be able to communicate with those subsystems for some reason. Or more likely you have a web application that needs to communicate with them in the same way (because Javascript). Assuming that the above features are already enabled in Prosody …
As not bleeding edge, nifty-keen-like-wow the XMPP protocol is, Jabber (the colloquial name for XMPP I'll be using them interchangably in this article) has been my go-to means of person-to-person chat (as well as communication protocol with other parts of me) for a couple of years now. There are a bunch of different servers out there on multiple platforms, they all support pretty much the same set of features (some have the experimental features, some don't), and the protocol is federated, which is to say that every server can talk to every other server out there (unless you turn that …