How to configure multiple sites?

Author Message

Bjørn Olav Sagen

Thursday 03 August 2006 2:25:28 am

Hi everyone.

I'm working on making my existing site into multiple sites and I've been trying to find tutorials and how-to's without luck.

I've seen a few multisite posts in the forums but I haven't managed to get a clear picture of what to do.

So far I've taken the
/settings/siteaccess/<original_site>/*.* and
/settings/siteaccess/<original_site_admin>/*.*

and copied them to
/settings/siteaccess/<newsite_site>/ and
/settings/siteaccess/<newsite_site_admin/

same goes for
/design/<orignal_site>/*.* to
/design/<new_site>/

Then I went on to configuring the settings.
I changed the /settings/siteaccess/<newsite_site/site.ini.append.php first and then I changed
/settings/override/site.ini.append.php into something like this:
<b>override\site.ini.append.php</b>

...

[Session]
SessionNameHandler=custom

[SiteSettings]
DefaultAccess=intranet
SiteList[]
SiteList[]=intranet
SiteList[]=tellus-software
SiteName=Tellus Software - Intranet
MetaDataArray[author]=eZ systems
MetaDataArray[copyright]=eZ systems
MetaDataArray[description]=Content Management System
MetaDataArray[keywords]=cms, publish, e-commerce, content management, development framework
SiteURL=www.tellus-software.local


[SiteAccessSettings]
CheckValidity=false
AvailableSiteAccessList[]
AvailableSiteAccessList[]=intranet
AvailableSiteAccessList[]=intranet_admin
AvailableSiteAccessList[]=tellus-software
AvailableSiteAccessList[]=tellus-software_admin
MatchOrder=uri
HostMatchMapItems[]
RelatedSiteAccessList[]
RelatedSiteAccessList[]=intranet
RelatedSiteAccessList[]=intranet_admin
RelatedSiteAccessList[]=tellus-software
RelatedSiteAccessList[]=tellus-software_admin

...

I'm really starting to get insecure about the configuration here because some posts on the forum has said to use:

[SiteAccessSettings]
CheckValidity=false
AvailableSiteAccessList[]
AvailableSiteAccessList[]=site1
AvailableSiteAccessList[]=site2
AvailableSiteAccessList[]=siteadmin
MatchOrder=host
HostMatchMapItems[]=www.domain1.com;site1
HostMatchMapItems[]=www.domain2.com;site2
HostMatchMapItems[]=siteadmin.domain.com;siteadmin

I'll list my questions here in hope of not having to use another week of searching:

1. Is possible to have one admin-page pr site or can there only be _one_ adminpage no matter how many sites?

2. I'm interessted in having the sites separated, but I read in a post that one could create a 'site' class as a folder and place each site underneath within the admin-interface. Is that the only way to do this or can I have the sites totally separated?

3. Does each site require their own database within the server, or can / must they share the same one?

4. Could someone, if it doesn't require 2 weeks of writing and editing, tell me step by step the approach of putting up a multisite or link me some existing tutorial(s) on the topic?

I'd really appreciate some help :)

Thanks in advance and best regards!

-Bjørn-

Apache 1.3.35
Php 4.4.2
MySQL 4.0.1
EZpub 3.8.2

George Michaelides

Thursday 03 August 2006 5:15:12 am

You may want to flick through http://ez.no/community/articles/new_features_in_ez_publish_3_8

www.jegodesigns.com
www.jegodesigns.eu

Bjørn Olav Sagen

Thursday 03 August 2006 5:53:28 am

Hi George.

Thank you for the reply.

I did flick through it but if I'm not mistaken, that tutorial is solely about making _one_ site, or some of its contents, multi<i>lingual</i>.

I'm just looking for a guide to hosting multiple sites.

Considering the fact that your company specializes in eZ deployments, I'd really appreciate any feedback you have on hosting multiple sites :)

Best regards!

-Bjørn-

Apache 1.3.35
Php 4.4.2
MySQL 4.0.1
EZpub 3.8.2

Theodoros Papageorgiou

Thursday 03 August 2006 3:00:33 pm

1. Is possible to have one admin-page pr site or can there only be _one_ adminpage no matter how many sites?

Yes, each one with it's own design and configuration of the admin.

2. I'm interessted in having the sites separated, but I read in a post that one could create a 'site' class as a folder and place each site underneath within the admin-interface. Is that the only way to do this or can I have the sites totally separated?

I prefer to use a different database as well as directory for each site.
For example database: site1db, directory var/site1, var/site1_admin
You can also symlink the directories to other locations.
This way it's easier to backup individual sites or move sites to another server.

3. Does each site require their own database within the server, or can / must they share the same one?

It's easier to setup in a different database.

4. Could someone, if it doesn't require 2 weeks of writing and editing, tell me step by step the approach of putting up a multisite or link me some existing tutorial(s) on the topic?

If you have only one website and an intranet then you can use url mapping but for many different domains/websites you have to use host mapping.
I think there's enough info at the forums and the documentation section on this.

WEBWiZ
Web Development
http://www.webwiz.gr

Bjørn Olav Sagen

Thursday 03 August 2006 11:50:08 pm

Hi Theo.

Thank you for the reply.

I'll get started on the databases right away.

-Bjørn-

Apache 1.3.35
Php 4.4.2
MySQL 4.0.1
EZpub 3.8.2

Theodoros Papageorgiou

Friday 04 August 2006 1:22:12 am

BTW don't separate the cache directories for the site accesses that use the same database, for example site1 and site1_admin (site and admin) you'll have cache problems.
See this post:
http://ez.no/community/forum/developer/cache_block_with_subtree_expiry_and_cachedir_problem

WEBWiZ
Web Development
http://www.webwiz.gr

Bjørn Olav Sagen

Friday 04 August 2006 2:08:19 am

Thank you for all your help so far.

I've now got design folders for site1, site1_admin, site2, site2_admin.
Same goes for settings-folder.

I created a new database for site2, and put all the connection info into
settings/site2/site.ini.append.php and settings/site2_admin/site.ini.append.php.

I removed any virtual hosting on the apache server temporarily to get access to the new
site since the old virtual hosting resulted in trying to open host\ez\index.php\site1\site2\ which just lead to 404s.

I can now get access to site2 and site2_admin but it keeps giving me "kernel:50 no database connection" even though I've added the new database, granted all on a new user, ran kernel\sql\ scripts to set it up, and configured the site.ini.append.phps. Site1 still works as normal.

I know that the database connection info is correct. Could there be some other configuration error in override\site.ini.append.php that might cause this? I've removed any db-connection info from override but I still think my [SiteSettings] [SiteAccessSettings] might be wrong. Could that lead to kernel:50 too?

Apache 1.3.35
Php 4.4.2
MySQL 4.0.1
EZpub 3.8.2

Bjørn Olav Sagen

Friday 04 August 2006 2:24:05 am

Definitely some configuration error here.
I tried to set the new site2_admin page as default page + playing around in site.ini.append.php and the kernel:50 is gone. Got other errors, but still there's contact with the database.

I'll try and search some more for hints on configuring multiple sites. I did follow a tutorial the first time I did this but that didn't work either hehe.

Anyhow, thanks for all your help.

-Bjørn-

Apache 1.3.35
Php 4.4.2
MySQL 4.0.1
EZpub 3.8.2

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.