Hi,
That may be a solution but that can't be THE solution. Imagine I have a server with a hundred of sites, must I add them all to /etc/hosts
? ofc not. If you administer a cPanel server, for example, you'll see that doesn't happen (having the domains at the hosts file with 127.0.0.1), and it performs loopback requests just fine.
There is an issue with aaPanel that prevents loopback requests. This should be fixed by the aaPanel team definitely. The workaround is nothing but that: a workaround, which in nature is temporary.