1. MultiTikis using SubDomains | |
This section describes a sub-domain MultiTiki setup, where a subdomain points to a directory immediately below your www directory, e.g.:
|
1.1. Create subdirectories | |
If you can't use setup.sh (See MultiTiki) and/or tiki-install.php, you have to create your subfolders manually for your multitiki installation to work, but you'll need to make symlinks (or have them made for you by an admin), as many as sites you want to install with the same multitiki setup. You could run ./setup.sh and provide the two names (site1 and site2 afterwards, when requested after the [multi]: option), or you need to manually create your subdirectories site1 and site2 inside each of the following folders (list of folders are defined as the Copy to clipboard
|
1.2. Add a single customized local.php for all | |
You need to add a manually modified ./db/local.php with the following syntax: Copy to clipboard |
1.3. Add local.php for each site | |
Proceed as usual with tiki-install.php, or if you can't for whatever reason, then, add a standard local.php file inside each of each multitiki subfolders of db, i.e.:
Copy to clipboard
|
1.4. Create symlinks for the multitiki to work | |
You need to create symbolic links (symlinks) in order to make your multitiki in subdirectories work.
and you want to setup your multitiki out of the apache public directory, but here instead, for example:
Then you need to create symlinks (or request them to be created by an admin for you), with instructions like these (prepending "sudo" to the commands or switching to the root account): Copy to clipboard
Note: Make sure the site1 and site2 directories do not exist before executing the above commands. |
1.5. Running tiki-install | |
You are done with the manual setup. One by one, browse to each of your MultiTiki sites (e.g. http://localhost/site1/ and http://localhost/site2/) and start configuring them individually. If you setup a common username and password for all your multi-tiki's, then the tiki-install.php script (Tiki 3.0) will recognize the MultiTiki installation as you proceed.
|
2. MultiTikis in subdirectories (Directory Structure Setup) | |
Suppose you want to avoid subdomains or would instead like your tiki structure to be directly accessed and located within a single directory (e.g. under a /var/tiki/, out of the public htdocs folder of your server, for instance, and symlinked from /var/www/site1 and /var/www/site2 )
We begin by loading all the tiki files into the /var/tiki/ directory. |
2.1. Create Subdirectories | |
Per instructions above, either run setup.sh or manually create the required subdirectories for your various tikis (tiki1, tiki2) |
2.2. Add a single customized local.php for all | |
This is where we will diverge somewhat slightly from the subdomain strategy. Namely, we need to test the REQUEST_URI to determine where to funnel the visitor. Once again, with our specific example values shown, you need to add a manually modified ./db/local.php with the following syntax: Copy to clipboard
|
2.3. Add local.php for each sub-tiki | |
Again, we'll branch a little from the prior setup by populating out the local.php files for each tiki. At this point, it helps to take a side step and set up your databases (see documentation elsewhere). For simplicity you may want your MultiTikis to share a common username/password, but this is not necessary (or particularly secure). Below is an example for our site1. This file would get saved under ./db/site1/local.php Copy to clipboard |
2.4. Create Symlinks | |
You need to create symlinks (or request them to be created by an admin for you), with instructions like these: Copy to clipboard
This will effectively redirect a visitor headed to www.mydomain.com/site2 to www.mydomain.com/site2 where our local.php script will parse the REQUESTED_URL, realize that the user wants site2 and proceed accordingly. If the visitor attempts to visit www.mydomain.com/site3, he/she will be redirected to www.mydomain.com/site1 instead. |
2.5. Run tiki-install.php | |
Now, for each site, you will browse to it and run tiki-install.php (e.g. www.mydomain.com/site1/tiki-install.php) A few notes:
|
3. Extra: Add .htaccess for all (optional) | |
You can also add a single customized .htaccess for them all at the MultiTiki root
See also
|