eZ Community » Forums » Install & configuration » configuration of 12 sites with one admin
expandshrink

configuration of 12 sites with one admin

configuration of 12 sites with one admin

Wednesday 19 July 2006 1:37:27 pm - 4 replies

We have the admin set up for 12 sites running off one admin.

The main url is hosted on the machine where ez is installed. The remaining 12 domains point to another machine. Without changing the named server tags, as this will then incure 11 more accounts whit the host and cost alot. Can we redirect the url in anyway?

Peter

Wednesday 19 July 2006 2:54:06 pm

Hi Peter

As a community member I will try to help you with your issue.

First of all you need to get the domain names pointed to the right IP address, if you don't know this address your hosting provider will tell you. Then you need to get your hosting provider to add your 11 domain names as aliases to your virtual host configuration in Apache.

When this first part is done by your hosting provider, the rest is about eZ publish configuration.

If the name of you first siteaccess is site you will find a folder in settings/siteaccess/ that is named site. The first this you need to do is to make copies of this folder for 11 different sites ( if you want 11 sites to look different from you first one ). Let's make an example where you name those site1. site2 ...... site11.

You then need to edit your [SiteAccessSettings] in the settings/override/site.ini.append.php file to look something like this:


[SiteAccessSettings]
CheckValidity=false
AvailableSiteAccessList[]
AvailableSiteAccessList[]=site
AvailableSiteAccessList[]=site1
AvailableSiteAccessList[]=site2
AvailableSiteAccessList[]=site3
AvailableSiteAccessList[]=site4
AvailableSiteAccessList[]=site5
AvailableSiteAccessList[]=site6
AvailableSiteAccessList[]=site7
AvailableSiteAccessList[]=site8
AvailableSiteAccessList[]=site9
AvailableSiteAccessList[]=site10
AvailableSiteAccessList[]=site11
AvailableSiteAccessList[]=siteadmin
MatchOrder=host
HostMatchMapItems[]=www.domain.com;site
HostMatchMapItems[]=www.domain1.com;site1
HostMatchMapItems[]=www.domain2.com;site2
HostMatchMapItems[]=www.domain3.com;site3
HostMatchMapItems[]=www.domain4.com;site4
HostMatchMapItems[]=www.domain5.com;site5
HostMatchMapItems[]=www.domain6.com;site6
HostMatchMapItems[]=www.domain7.com;site7
HostMatchMapItems[]=www.domain8.com;site8
HostMatchMapItems[]=www.domain9.com;site9
HostMatchMapItems[]=www.domain10.com;site10
HostMatchMapItems[]=www.domain11.com;site11
HostMatchMapItems[]=siteadmin.domain.com;siteadmin 

Now you can edit settings separately for each single domain in settings/siteaccess/sitexx/

If you then specify different design folders your domains will look different. It's also recommended to specify separate var folders for each siteaccess.

Remember this is a eZ publish configuration and not a part of a hosting providers normal responsibilities, so I only exchange my knowledge as a private community member happy.gif Emoticon

Hope this could help you Peter

- Egil

Sunday 23 July 2006 4:39:37 pm

Hi Peter and Egil!
Regarding multisite ez setup, I suggest you to create some class (Site) and one instance of it for every hosted site. That Site object will be the root node of your site instance inside the same content tree.

Don't forget to setup RootNode, IndexPage, DefaultPage and PathPrefix parameters. For example:

settings/siteaccess/sitex/content.ini.append.php:

	[NodeSettings]
	RootNode=60

settings/siteaccess/sitex/site.ini.append.php:

[SiteSettings]
IndexPage=/content/view/full/60/
DefaultPage=/content/view/full/60/

[SiteAccessSettings]
PathPrefix=sitex

Also, You will have to alter some templates which assume that the content root node is 2, like templates/menu/flat_top.tpl or the sitemap template. Just replace the hardcoded value (2) with something like ezini('NodeSettings','RootNode','content.ini'). (Shoud I post this as an enhancement to the bug section?)

PathPrefix is also important because it will assure that the content of siteB can't be accessed through siteA (for example: www.siteA.com/siteB/aboutB)

Unfortunatly, PathPrefix is not documented yet, but here you can find some examples:
http://ez.no/doc/ez_publish/techn...te_ini/siteaccesssettings/pathprefix

Furthermore, if your hosting provider doesn't allow you to add aliases, you could maybe add some addon-domains or subdomains via availiable hosting package management tool (like cpanel or helm).

If you do that, you will have one webroot directory for each site - just leave one, delete the others and create symbolic links instead which point to the "master" directory.

For example:
site1 (directory with the ez installation)
site2 -> site1/ (symbolic link)
site3 -> site1/ (symbolic link)
site4 -> site1/ (symbolic link)
...
...

Vjeran

Sunday 23 July 2006 7:27:41 pm

Hi Vjeran,

Thanks for your advice. I'm now unsure this process is going to do what we want. We want 12 sites with seperate urls (not subdomains or sub directories) All the sites run from the same data source and will have there own room for a forum.

Are we going to be able to acheive this?

The site isnt functioning now with this www.freetopaste.com (temp url)... This the content of my site.ini.append.php file

<?php /* #?ini charset="iso-8859-1"?

[ExtensionSettings]
ActiveExtensions[]
ActiveExtensions[]=ezdhtml

[Session]
SessionNameHandler=custom

[SiteSettings]
DefaultAccess=site
IndexPage=/content/view/full/60/
DefaultPage=/content/view/full/60/

SiteList[]
SiteList[]=site

[SiteAccessSettings]
PathPrefix=sitex
CheckValidity=false
AvailableSiteAccessList[]  
AvailableSiteAccessList[]=site
AvailableSiteAccessList[]=site1
AvailableSiteAccessList[]=site2
AvailableSiteAccessList[]=site3
AvailableSiteAccessList[]=site4
AvailableSiteAccessList[]=site5
AvailableSiteAccessList[]=site6
AvailableSiteAccessList[]=site7
AvailableSiteAccessList[]=site8
AvailableSiteAccessList[]=site9
AvailableSiteAccessList[]=site10
AvailableSiteAccessList[]=site11
AvailableSiteAccessList[]=siteadmin
MatchOrder=host
HostMatchMapItems[]=www.domain.com;site
HostMatchMapItems[]=www.domain1.com;site1
HostMatchMapItems[]=www.domain2.com;site2
HostMatchMapItems[]=www.domain3.com;site3
HostMatchMapItems[]=www.domain4.com;site4
HostMatchMapItems[]=www.domain5.com;site5
HostMatchMapItems[]=www.domain6.com;site6
HostMatchMapItems[]=www.domain7.com;site7
HostMatchMapItems[]=www.domain8.com;site8
HostMatchMapItems[]=www.domain9.com;site9
HostMatchMapItems[]=www.domain10.com;site10
HostMatchMapItems[]=www.domain11.com;site11
HostMatchMapItems[]=siteadmin.domain.com;siteadmin

[RegionalSettings]
Locale=eng-US
ContentObjectLocale=eng-US
TextTranslation=enabled

[NodeSettings]
RootNode=60 

[FileSettings]
VarDir=var/corporate_site

[MailSettings]
Transport=sendmail
AdminEmail=p.g@petergarner.com
EmailSender=
*/ ?>

Peter

Modified on Sunday 23 July 2006 10:53:55 pm by P G

Sunday 23 July 2006 11:11:04 pm

Hi Peter,
please give some more explanation of the desired functionality. What means "All the sites run from the same data source and will have there own room for a forum."?

I supposed that all sites will have their own content subtree inside the same content tree (one database). Am I correct?

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from