thanks, Jose.
I followed it exactly,
it wasn't working because it was not an issue in aapanel settings.
Managed to make it work that same day
the only issue was in my DNS nameserver in google cloud not aapanel
//////////////////*//
//////////////////*//
So for the newbies struggling with the same thing:
I had to point my DNS from Freenom to the same nameservers of google cloud
So the way it works is you create a DNS zone in Google cloud
let´s say google DNS assigns you
ns1.example-google.com
ns2.example-google.com
pointing to your virtual machine Ip
let´s say your IP is 0.0.0.0
So the DNS zone points to your Virtual machine instance.
and the Name server points to that DNS Nameserver
Done
more detailed?
let me explain it, with an example:
Get a domain (Freenom) for any of your multiple websites (as many as you like)
pointing to the same nameserver of google
how? you have to Google: how to create a Google DNS Zone for my website
then
you have point
your first Freenom domain let’s say www.example.com to the Google DNS zone
in Freenom click on manage domains
then click in the tab at the top---> manage nameserver
and write the nameserver you got from Google DNS zone/Nameserver
example
ns1.example-google.com
ns2.example-google.com
your second domain www.second-example.com YOU STILL point it to the same google cloud nameservers/DNS ZONE:
Again for your www.second-example.com in Freenom click on manage domain then manage nameserver and write your same Google DNS zone/Nameserver
ns1.example-google.com
ns2.example-google.com
(I wasn’t doing it so it wasn't working haha)
then in Nginx you redirect traffic to the website to the right port for each website
to so, do the same as the screenshot posted by aaPanel_Jose (your domain name:YOURPORT)
so for every website, use a different port
Why? Because ns1.example-google.com nameserver point to your IP since both domains will be hosted on the same server they can share IP
essentially you are pointing both domains to the same IP and then let aaPanel and Nginx decide which website to show depending on the port
repeat process for as many websites as you like
there are some other ways to do it but that’s the easiest way I found
hope it helps someone