aliasing sites.php

Events happening in the community are now at Drupal community events on www.drupal.org.
adominique's picture

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

beautifulmind's picture

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

adominique's picture

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

beautifulmind's picture

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: