I have an instance of Atlassian Confluence fronted by Apache using mod_proxy_ajp to pass inbound port 80 requests to 8080 on tomcat. Let's say the url users use is http://www.mywiki.com/confluence/. Confluence generates emails to send to users with links to pages with changes. When a user clicks on links in those emails, the user is taken directly to the local server hostname with :8080, not the public facing DNS name that Apache accepts requests from.
In other words, the links are http://nasty-app-server-name:8080/confluence/xyz/ and not http://www.mywiki.com/confluence/xyz.
How can I configure Confluence to insert www.mywiki.com in the hyperlinks generated by Confluence, instead of the nasty-app-server-name? I figure somewhere there's a template that has $hostname. I want to override that with a DNS name.