While CloudPanel is a great panel, it lacked the ability to add domain aliases or parked domains without manually modifying nginx config files.
Even if you modify the vhost server_name with addon domain, it still shares any SSL certificate with the main domain, which is not optimum for our use case, so below is our solution to have the domain be completely independent (Own SSL, own Vhost file) but share the directory of your main domain as an alias while still using the web interface (mostly) to manage the new alias: \
What is required?
-Main site (let's assume main site document path is /home/mainsite/htdocs/mainsite.com and the username and group are "mainuser")
-Secondary site (we're going to create it following the steps in this Gist) \
Steps:
1-Create a new site (Use any template other than reverse proxy, we recommend PHP).
2-Generate the SSL using let's encrypt for your new site like you'd normal do for any website. \