drupal error "The provided host name is not valid for this server"

From thelinuxwiki
Revision as of 19:06, 12 November 2018 by Nighthawk (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

drupal version: 8 error message(browser): The provided host name is not valid for this server

problem description: and apache2 web alias using only the site domain name will not pull up the site. The afore mentioned error is presented in the browser.

solution

$settings['trusted_host_patterns'] = [
 '^localhost$',
 '^www\.mydomain\.com$',
 '^mydomain\.com$',
 '^127\.0\.0\.1$',

];