When I creates a sub-site (for Drupal 8) with aegir and look at the new sub-site I get the error ”The provided host name is not valid for this server”.
Example: I have a site called www.example.com and create a new sub-site www.example.com/internal. Then I see the error when I visit the URL www.example.com/internal.

This error message is coming from a feature that was added to Drupal 8 to protect against HTTP Host header attacks (https://www.drupal.org/node/1992030). The problem is that the trusted hosts thats is generated by Provision in provision_drupal_settings_8.tpl.php, when you have a sub-site, is not a valid host name.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

AndKar created an issue. See original summary.

AndKar’s picture

Here is a patch that solvs the problem.

helmo’s picture

Status: Active » Needs review

Looks ok at first glance.

helmo’s picture

Status: Needs review » Reviewed & tested by the community

  • helmo committed 8ed8b8b on 7.x-3.x authored by AndKar
    Issue #2979542 by AndKar: Drupal 8 sub-sites gets error message: ”The...
helmo’s picture

Status: Reviewed & tested by the community » Fixed

committed, thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.