Posted by adominique on June 14, 2021 at 4:14am
While hosting site with ec2 (aws), the server provides a default Public IPv4 DNS address in the form of i.e.:
ec2-xx-xx-xx-xx.ap-zone-1.compute.amazonaws.com
Now when pointing to this address on a multisite installation, Drupal does not recognize this alias, i.e.
$sites['ec2-xx-xx-xx-xx.ap-zone-1.compute.amazonaws.com'] = 'mysite.com';
and goes to default folder instead.
How to enforce 'mysite.com' in this particular case ?

Comments
Vritualhost configurations
Hello There!
Please have a look at this post and confirm that you have correct virtualhost settings.
http://jos.cx/multisite
Even though, you have one IPv4 address, you can host multiple sub/domains and point them to the correct directory by configuring the virtualhost.
Regards.
BeautifulMind
Hello, thank you. The problem
Hello,
thank you.
The problem I am referring is not at server host settings but at Drupal level.
When the server send the https request to the Drupal multisite folder, the sites.php file should route the request to mysite.com:
$sites['ec2-xx-xx-xx-xx.ap-zone-1.compute.amazonaws.com'] = 'mysite.com';
But it does not and goes to default instead.
Hi, Drupal does know about
Hi,
Drupal does know about the multisite by consulting the sites.php but the server won't and it can't. The only way to point the request to a correct directory is, to create an apache/nginx routine.
If I may, can I have a look at your sites.php file?
Regards.
BeautifulMind