This gist has been replaced by two proper blog posts:
-
-
Save iNPUTmice/4f58f15d9a8d2d09cfc586074184decb to your computer and use it in GitHub Desktop.
@Menelmacar I’m wondering if this is the 'smarter' setup generally - regardless of whether people want to combine it or not - because it gets rid of the somewhat awkward localhost VirtualHost.
I failed to run the UP provider for quite some time, your post made me check my config again. The problem was that I run the HTTP(S) part behind caddy, since the host also has web services running. For that I had globally http_external_url = "https://xmpp.example.com/" set. The external URL for the UP component got overwritten by that and was wrong. I now have the following snippet in my VirtualHost and it works:
Component "notify.xmpp.example.com" "unified_push"
unified_push_secret = "randomstuff"
unified_push_acl = { "@example.com" }
http_external_url = "https://notify.xmpp.example.com/"
In caddy this works:
notify.xmpp.example.com {
reverse_proxy localhost:5280 {
header_up Host "notify.xmpp.example.com"
flush_interval -1
}
}
Thanks for the docs and I hope this might help others behind a reverse proxy.
@Menelmacar I’m wondering if this is the 'smarter' setup generally - regardless of whether people want to combine it or not - because it gets rid of the somewhat awkward localhost VirtualHost.
I think so too, and a virtualhost without c2s and no registration is nearly a component anyway, but with the extra of easily used for things like mod_post_messages too.
I see you put that version on your website already, it looks nice and clean now 🙂
For the curious, the simple way to use it all on a single domain would be:
And ditch the component.