There should be no issues doing this with nginx. I'd recommend checking out this article posted by HubSpot Solution Architect Robert Ainslie. It goes into a lot of detail as to how to set this up.
Jack Coldrick, Head of Presales & Solution Architecture @ Inbound Fintech | HubSpot Elite Partner
yes, but I read something like this in this article: "you want the initiating domain to be the exact same that you add to HubSpot". That way I guess its not possible use proxy with subdomain.