- I started with a working site and performed the following steps to add a second one
I started with a working site and performed the following steps to add a second one
- Create a symlink, making the /backend a symlink to the web root:
Create a symlink, making the /backend a symlink to the web root:
ln -s backend . Add entries to my sites.php (because with our deployment workflow, the site name cannot always match with the domain name. Also allows us to test with xip.io).
$sites['mysite.dev'] = 'mysite'; $sites['mysite.dev.backend'] = 'mysite.backend';I created a directory named mysite.backend .
In mysite.backend, I created a directory corresponding to all directories in mysite.
In mysite.backend, I created the following settings.php file:
$databases = array ( 'default' => array ( 'default' => array ( 'database' => 'XXXXXX', 'username' => 'XXXXXX', 'password' => 'XXXXXX', 'host' => 'localhost', 'port' => '', 'driver' => 'mysql', 'prefix' => '', ), ), ); $update_free_access = FALSE; $drupal_hash_salt = 'k_vtgGjzCyq0mp0dsxDk1gILuEs6G5ODP5aJuQsAUuc'; $base_url = 'http://mysite.dev/backend'; // NO trailing slash! ini_set('session.gc_probability', 1); ini_set('session.gc_divisor', 100); ini_set('session.gc_maxlifetime', 200000); ini_set('session.cookie_lifetime', 2000000);I go to
/backend/install.phpand go through the install process. Everything goes smoothlyI click the link to view the new site, and enter the admin login credentials (for the new site. I made it a point to have separate logins for each site)
ln -s backend .
- Add entries to my sites.php (because with our deployment workflow, the site name cannot always match with the domain name. Also allows us to test with xip.io).
$sites['mysite.dev'] = 'mysite';
$sites['mysite.dev.backend'] = 'mysite.backend';
- I created a directory named mysite.backend .
- In mysite.backend, I created a directory corresponding to all directories in mysite.
- In mysite.backend, I created the following settings.php file:
$databases = array (
'default' =>
array (
'default' =>
array (
'database' => 'XXXXXX',
'username' => 'XXXXXX',
'password' => 'XXXXXX',
'host' => 'localhost',
'port' => '',
'driver' => 'mysql',
'prefix' => '',
),
),
);
$update_free_access = FALSE;
$drupal_hash_salt = 'k_vtgGjzCyq0mp0dsxDk1gILuEs6G5ODP5aJuQsAUuc';
$base_url = 'http://mysite.dev/backend'; // NO trailing slash!
ini_set('session.gc_probability', 1);
ini_set('session.gc_divisor', 100);
ini_set('session.gc_maxlifetime', 200000);
ini_set('session.cookie_lifetime', 2000000);
- I go to /backend/install.php and go through the install process. Everything goes smoothly
- I click the link to view the new site, and enter the admin login credentials (for the new site. I made it a point to have separate logins for each site)