x
 
Create New Page
 View Previous Changes    ( Last updated by Wes Baker )

Guide: Subdomains & Multiple Sites under Different Directories Without MSM

This is the unsupported method of creating multiple sites without using MSM.

 
Example Server Directories: (structure varies with hosts)

Main Site:  /var/www/primary-site.com/html/      (EE Installed Here)
Subdomain 1: /var/www/blog2.primary-site.com/html/  (WEBLOG Blog2 here)
Subdomain 2: /var/www/forum.primary-site.com/html/  (Forum Here)

 
Control Panel Stuff:

Create WEBLOG’s and Template Groups accordingly.  Don’t have to unless you just like keeping things nice and separated.

 
ExpressionEngine 2.x

Needed Files: (Copied from main EE install directory, not system)

- index.php (from main EE install directory)
 
index.php:

- Choose the correct system path, either relatively (like in the example below) or absolutely (using the full path from the root of the file system)
- Choose the desired template_group and template (both are required)

[...]

    $system_path 
"../../primary-site.com/html/system/";

[...]

    $assign_to_config[
'template_group''blog';
    
$assign_to_config['template''index';    

[...

 
ExpressionEngine 1.x

Needed Files: (Copied from main EE install directory, not system)

- path.php
- index.php (from main EE install directory)

 
path.php:

- Choose the correct system path, either relatively (like in the example below) or absolutely (using the full path from the root of the file system)
- Choose the desired template_group and template (both are required)
- Choose the correct site_url

<?php

$system_path 
"../../primary-site.com/html/system/";

$template_group "blog2_tpl_grp";
$template "index";
$site_url "http://blog2.primary-site.com/";
$site_index "index.php"; *** Optional
$site_404 
"";
$global_vars = array(); // This array must be associative

?> 

 
index.php

Do not edit.

 
Multiple Domain Login

If you want someone to login to all domains managed by the same ExpressionEngine install, you’ll need to follow the steps here:
http://expressionengine.com/wiki/Multiple_Domain_Login/ Make sure to read it all, don’t forget to empty the Cookie Domain field and turn on Cookies Only in the Session Preferences.

If you require that people who sign up at the different sites be automatically assigned a usergroup, you MUST use MSM.

 
.htaccess

If you want to use .htaccess to remove index.php from either ExpressionEngine 1.x or 2.x, take a look at .htaccss Tips & Tricks for more information.

 
Category:Subdomains
Category:Multiple Sites
Category:Discussion Forum
Category:EE1
Category:EE2