To setup Confluence server with reverse proxy, one needs to set consistent FQDN to all of Server Base URL, proxyName of server.xml and reverse proxy setting of Apache/Nginx. This is not simple (†1).
What is the reason for all of these to be consistent ? There are many web applications which works without the care of FQDN part of the URL.
(†1) Especially when the application server is runing in private network with external access with port mapping, host naming of private network is different from the external (public) network which makes Confluence setup complicated.