Lesson 6.5: Capstone, a multisite from scratch
The last lesson brings the course together. Each learner builds, on their own and from an empty directory, a small multisite for a brief, using the commands of modules 1 to 6. The trainer helps only when asked and checks the result against a checklist at the end. The checklist is the trainer's own assessment, not an official certification; the partner program's certifications are separate (Certifications).
At a glance
| Course | Multisite and site packages |
| Module | Module 6: Installing sites with the kickstarter and exp:install |
| Duration | 90 minutes (10 briefing, 70 work, 10 checking) |
| Level | Advanced |
| Audience | Learners who completed modules 1 to 5 and lessons 6.1 to 6.4 |
| Prerequisites | A fresh code directory per learner; the course pages open for reference |
Learning objectives
After this lesson, learners can:
- plan and install a multisite on their own with
exp:install; - add a site with its own host and a language siteaccess with a redirect to the visitor's language;
- keep that site's settings in a site extension, with logs of its own;
- package the site's content and prove each step with a command or a request.
Trainer's notes
How to present it
The brief (5 minutes). Read it aloud and put it on the projector:
A cooperative runs two brands from one office: "North" at
north.localhostin English, and "South" atsouth.localhostin English (/en) and German (/de), with visitors ofsouth.localhost/sent to their language. South's settings live in its own extensionsite_south, its logs in a directory of their own. At the end, the content of South is exported as a package for the agency that will translate it.Rules (3 minutes). Work alone; use the course pages and
--help; write down every command in a text file (capstone-commands.txt), because the commands are part of the result. Addresses atexample.invalidonly.Hints, only when asked. Point to the lesson, not the answer: install (6.2), second site (1.3), language siteaccess (1.4), host matching (2.2), host and path (2.3), redirect (2.4), site extension (3.1), logs (3.3), package (5.3).
Checking (10 minutes). Walk the checklist below with each learner, or let pairs check each other with it and check two learners yourself.
Common questions
May I use sevenx_multisite instead of the clean package? Yes; the clean package keeps the tree small, which
makes the checks quicker.
Must North and South be separate folders? Yes: each brand has a root folder of its own, as in lesson 1.3.
What if I run out of time? Stop where you are and check the points you reached; the commands file shows what was planned.
Is the checklist graded? That is the trainer's decision; the checklist is the trainer's own assessment, not an official certification; the partner program's certifications are separate (Certifications).
Pitfalls
- Starting in the wrong directory. The capstone needs a fresh directory, never the installation of earlier modules.
- Host map before the siteaccesses exist. Create and register the siteaccesses first, then match them.
- Forgetting caches. Clear the INI cache after each settings change (and restart Velocity if it serves the lab).
Hands-on exercise
The steps are the brief broken down; learners choose the commands.
- Install with
exp:installon SQLite, URL matching, the packagesevenx_multisite_clean, the title "Cooperative" and[email protected]. Change the administrator password and delete the password file. - Create the folders
NorthandSouthbelow the top folder and note their node IDs. - Create the siteaccesses
north,south_enandsouth_de(copies ofsite), each with itsSiteName,IndexPage,DefaultPageandRootNode;south_dewith German regional settings andeng-USas fallback. - Register them in
AvailableSiteAccessList[],RelatedSiteAccessList[]andSiteList[]. - Match
north.localhosttonorthwith the host probe, andsouth.localhostwithenanddeto the two South siteaccesses withhost_uri. - Send visitors of
south.localhost/to/dewhen their browser wants German and to/enotherwise. - Move the settings of
south_enandsouth_deinto a new, activated extensionsite_south. - Give South's siteaccesses a log directory of their own.
- Package the subtree
Southwithout classes and templates and export it tovar/tmp/capstone/. - Serve the directory and run the checks of the checklist with
curl.
Expected result
The trainer's checklist; each point is proved by the command or request in brackets.
- The installation answers, and the administrator password file is gone
(
ls var/log/initial-admin-passwordfails). curl -s -H 'Host: north.localhost' <lab address>/shows the name North.curl -s -H 'Host: south.localhost' <lab address>/enshows South in English,/dein German.curl -sI -H 'Host: south.localhost' -H 'Accept-Language: de' <lab address>/answers302to/de, and withAccept-Language: ento/en.exp:ini where site.ini/SiteSettings/SiteName south_denames a file inextension/site_south/.- A request to
south.localhost/en/no-such-pagewrites its line into South's own404.log. php ezpm.php validate var/tmp/capstone/<file>.ezpkgreports the package valid.capstone-commands.txtlists the commands in order and contains no password.
Quiz
- In which order did you have to create siteaccesses, register them and match them, and why?
- Which probe matched
south.localhost/de? A.uriB.hostC.host_uriD.port - Why did
south.localhost/need a redirect entry, and not aHostUriMatchMapItems[]entry with an empty path? - Where does the value of
SiteNameforsouth_decome from after step 7? - Name one thing you would do differently on a live server.
Answers
- Create, register, then match: a probe that finds a name not in
AvailableSiteAccessList[]does not count. - C.
- An entry with an empty path would take
/for one siteaccess for every visitor; the redirect chooses by the browser's language (Lesson 2.4). - From
extension/site_south/settings/siteaccess/south_de/site.ini.append.php, unless a file loaded later sets it. - For example: real host names with DNS, certificates and
SiteURL; a database server; a backup before every reinstall; logs and caches planned for many sites;.ezpkgfiles kept outside the document root.
Further reading
- The whole course: Multisite and site packages: course overview.
- Setting up several sites in one installation.
- Multisite on one installation.
- 10. After installing.
Related pages
- Module 6: Installing sites with the kickstarter and exp:install
- Multisite and site packages: course overview
- Trainers: start here
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.