I suspect this is a niche requirement, but I figured I’d share it in case there’s anyone else who might find it useful.
I was following the instructions for setting up a custom domain at https://auth0.com/docs/custom-domains/self-managed-certificates but got stuck at step 3 - where you set up a reverse proxy for login.mydomain.com.
The docs assume that you use AWS and give you step-by-step instructions for setting up AWS CloudFront to do it.
But I don’t use AWS, so needed to translate it into something a bit more generic.
I ended up using nginx as it’s ideally suited to easily set up a reverse proxy. You can do it all with less than 20 lines of nginx config.
I’ve shared the nginx.conf you’d need at http://dalelane.co.uk/blog/?p=3653