I had the same question yesterday and was able to work it out.
It is right - you do not need any configuration of punjab. By default punjab will work on port 5280. Punjab directs stanzas to the desired server automatically.
<body rid='123' xmlns='http://jabber.org/protocol/httpbind' to='yourdomain.tld' xml:lang='en' wait='60' hold='1' content='text/xml; charset=utf-8' ver='1.6' xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh'/>
This is a stanza used to setup a connection via BOSH. You can see the 'to' Attribute. Punjab can tell from this what XMPP server to speak to.
Forget the connection manager setup stuff in Openfire. You can keep this feature completely disabled. That is because punjab uses a normal XMPP connection to Openfire - just as a usual client does - it talks on the default port 5222.
So all you have to do is
- tell punjab what url to listen to
- proxy BOSH requests to that url on punjab default port 5280
Tell punjab what url to listen to
In the punjab.tac file there is a line that says
root.putChild('bosh', b) # url for BOSH
So 'bosh' will be a part of the URL that strophe has to send its stanzas to, which will then be http://www.yourdomain.tld/bosh. The '/bosh' could also be '/http-bind' or '/xmpp-httpbind', but your punjab.tac file has to know this.
Proxy BOSH requests to that url on punjab default port 5280
Next your webserver has to handle the requests directed to '/bosh' and proxy them to punjab on port 5280. Suppose you use Apache, then in your virtual host configuration something like this would do the job:
<IfModule proxy_http_module>
ProxyRequests Off
ProxyPass /bosh http://localhost:5280/bosh
ProxyPassReverse /bosh http://localhost:5280/bosh
</IfModule>