This is how it is done at Atlassian for example. The closest thing I found in the documentation was to use mod_proxy, but it only gave examples which added '/jira' to the (existing) company URL.
How does the base URL (setting in JIRA) work in relation to this?