aliasing sites.php

Events happening in the community are now at Drupal community events on www.drupal.org.
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

Posted by beautifulmind on June 15, 2021 at 9:09am

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.

Hello, thank you. The problem

Posted by adominique on June 15, 2021 at 9:40am

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

Posted by beautifulmind on June 15, 2021 at 1:31pm

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.

Multisite

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

AltStyle によって変換されたページ (->オリジナル) /