Hi, I am late to this party but I guess after fiddling with aapanel and struggling with custom domain setup as everyone else here I have figured it out how to set the custom domain to aapanel properly with SSL. Check out my screen shot for the proof. anyways follow these steps if you have already installed the panel and these steps don't work for you i will suggest delete your server and reinstall Linux again and then follow the steps.
- Install the fresh Linux of your choice (I used oracle Linux 8).
- change the hostname of the server to (mypanel.example.com).
- This step is only for those who using Oracle cloud run these commands to prevent oracle to reset your hostname after reboot( chkconfig NetworkManager off,
service NetworkManager stop). - Point your (mypanel.example.com) domain to your server ip address simply.
- Install aapanel and after install open your aapanel with default provided url.
- In settings turn off SSL you might have to login again after turning off ssl.
- Add your custom domain (mypanel.example.com) in setting after saving that aapanel will log you out.
- open SSH with root access and type "bt" a menu will open.
- Select option (9) Clear panel cache, then (8) Change panel port (optional but recommended), (1) Restart panel, (14) View panel default info (note down the your custom url it will be like "mypanel.example.com:7800/abcde".
10 reboot the server. - after rebooting use the custom url "mypanel.example.com:7800/abcde" to login.
- go to setting and turn On SSL and use let's encrypt option.
thats it.
Hope it helps out.