How can I configure Drupal 8 with multi-site under an add-on domain using cPanel? I'm getting a 404 when I browse to my subdomain after following these steps:
- Clean install of Drupal to my add-on domain:
/public_html/addondomain.com/drupal
. I can successfully browse toaddondomain.com/drupal
- In cPanel, create a sub-domain at
sub.addondomain.com
with a document root at/public_html/sub.addondomain.com
- Create the directory
/public_html/addondomain.com/drupal/sites/sub.addondomain.com
- Create a
sites.php
withinpublic_html/addondomain.com/drupal/sites
that contains the following code:<?php $sites = array('sub.addondomain.com' => 'sub.addondomain.com',);>
. File permissions are 644. - Copy
/public_html/addondomain.com/drupal/sites/default/default.services.yml
to/public_html/addondomain.com/drupal/sites/sub.addondomain.com/services.yml
- Copy
/public_html/addondomain.com/drupal/sites/default/default.settings.php
to/public_html/addondomain.com/drupal/sites/sub.addondomain.com/settings.php
- Remove the directory
/public_html/sub.addondomain.com
- Create a symbolic link in
/public_html/
:ln -s addondomain.com sub.addondomain.com
When I do all of the above, I get a 404 error when I browse to both sub.addondomain.com
and sub.addondomain.com/drupal
. Why am I not redirected to the Drupal installation page where I can enter in my database info, etc.? Is the error with my symlinks? My server (cPanel) configuration? My .htaccess
under either my /public_html
, public_html/addondomain.com
, or /public_html/addondomain.com/drupal
?