IMPORTANT: Multiple sites with multiple URLS with the same installation?

IMPORTANT: Multiple sites with multiple URLS with the same installation?

Monday 10 May 2004 3:59:36 pm - 4 replies

Modified on Monday 10 May 2004 4:06:33 pm by Jonathan Dillon-Hayes

Author Message

Mark Marsiglio

Wednesday 12 May 2004 8:13:18 am

Is it important that the sites all use the same admin interface, or that a user can log in one time and change any of the content on any of the sites?

It seems that there are a couple of ways to do this:
1) Use your domain configuration on your webserver to set root directories within folders of the ez installation. For instance, using nice urls you can set domaina.com to have a root directory of server.com/sitenamea and domainb.com to point to server.com/sitenameb. This would require setting up your rewrite rule to not use the index.php in the URL (I don't think it would work without this step). In this scenario, you would also use sections for each site folder to designate the pagelayout to use for that section in the overrides. This would allow you to have completely different designs for each section. All settings would be in one siteaccess, and all data in one database, making it easy to assign multiple locations to give you the syndication of content that you desire. This is how I would do it.

2) Use one admin interface (only one design, but really separate admins) and require the admins to log in to each interface, one for each site. You can run many sites in one ezpub installation, and still point the domains directly to the desired site's folder. This would be more difficult to share content (would require an external link or use of frames).

Hope that helps...

Mark

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

Sean Keener

Wednesday 19 May 2004 10:33:35 am

I just wanted to throw my interest into this thread and maybe get some more activity. We also want to manage a number of domains from the same install. The suggestions above seem good - has anyone actually tried it? Experiences?

Going to conference in a few weeks...so hopefully we can learn more. :-)

Daniel Beyer

Thursday 03 June 2004 2:41:41 pm

Hi there,

I'm curently setting up a single eZ publish installation with multiple domains. In fact it is pretty easy to do, while using "host" as "MatchOrder" in section "[SiteAccessSettings]" in your "site.ini". I you do so you are able to use a completly different siteaccess for each of your domains (and/or subdomains). I will give a simple example:
Let's say we have 3 domains an 2 subdomains:
www.companyname.com (your company website)
www.cool-product.com (a special product of your company)
www.community.net (a community run by your company)

admin.companyname.com (control your sites)
root.company.com (the root of all your websites)

What we want is that each of these domains point to the same html-dir on the webserver. This is because we don't want things like "companyname.com/site1/index.php/..." or "cool-product.com/index.php/siteaccess/module_stuff/...".

What to do to make that work:
-Configure your server that evry domains points to the SAME directory on your webserver
-Configure your eZp and make a first website work (eg. company.com)
-Don't put any content on your new site and make sure you are using your own siteaccess
-Use your own design!!! (never touch "standard" designs in eZp - it's the Fallback-Design and not something to adapt!)
-remeber to set these settings correct:
--StandardDesign=standard
--SiteDesign=
--AdditionalSiteDesignList[]=

If your sites have a corporate design I recommend that you use a design called "default" (or "corporate", but not "companyname") and override specific things with an design called "companyname" or "coolproduct". Make use of the "AdditionalSiteDesignList[]"-Array and siteaccesses! If you have completly different looking site you don't need to do that - just use different siteaccesses...

Now to the domain-setup-thing:
First we need to create siteaccesses for your domains. As long as we want each of your domains point to another content (and/or design) in ezp we need to create a specific siteacces for each of our domains. I think you know how to handle siteaccesses - if you don't, remeber that our ""settings/siteacces/somename"-folder can override every setting in every file in "/settings". If we want to set a different design, create a site.ini in your "/settings/siteaccess/somename/-folder an write:
[DesignSettings]
SiteDesign=somedesign

If you want to have a different start- and/or default-page for your siteaccess (later for your domain):
[SiteSettings]
IndexPage=/content/view/full/2057/
DefaultPage=/content/view/full/2066/

Just search the ini-files for the entries you want to override (eg. an other language)...

Now we go on with the correct setup for your domains in ezp:
After we setup all of our siteaccesses and designs and configuration we just link a domain or subdomain to a siteaccess. Just do a configuration like this:

[SiteAccessSettings]

(...)

# A list over current active siteaccesses
AvailableSiteAccessList[]=admin
AvailableSiteAccessList[]=companyname
AvailableSiteAccessList[]=coolproduct
AvailableSiteAccessList[]=community
AvailableSiteAccessList[]=plain

(...)

# An array of access types which are tried, possible entries are: host, index, uri and port
MatchOrder=host

(...)

HostMatchType=map

(...)

HostMatchMapItems[]=companyname.com;companyname
HostMatchMapItems[]=www.companyname.com;companyname
HostMatchMapItems[]=coolproduct.com;coolproduct
HostMatchMapItems[]=www.coolproduct.com;coolproduct
HostMatchMapItems[]=community.net;community
HostMatchMapItems[]=www.community.net;community
HostMatchMapItems[]=admin.companyname.com;admin

The first of the HostMatchMapItems is your domain (subdomain), the second the siteaccess that will be used. There is no more need for the "/index.php/siteacces/module_stuff", since is now "companyname.com/index.php/module_stuff" (or siteaccess.companyname.com/...).

If you set
MatchOrder=host
to
MatchOrder=host;uri
you will be able to make use of both ways to open a siteaccess. But note: It's not possible to add a siteaccess in the "index.php/siteaccess"-style if your domain is listed in HostMatchMapItems[]. If you want to use this style I suggest you create a subdomain (e.g, root.companyname.com), point it to the same html-dir as the other domains and do NOT add it to HostMatchMapItems[]. ezp will now use the uri-style, because it can find a matching host-style entry.

You see. It's pretty easy to set up a single installation with multiple sites on it. It's a bit tricky to manage your content later - I suggest something like the domainnames on the root folder (nodeID 2) - if you want to seperate the content. And you should use sections and specific override-template-rules if your sites have different layouts (otherwise it would be possible to get content from community.net on companyname.com - if someone knows the specific nodeIDs. But that's an other problem and needs some thinkink about how to setup the site...

Hope you understood my "english" and I could help you. If there are any questions left just contact me: ich@daniel-beyer.com (if I don't answer you, mail again some days later - I have my domain on transfer to a new server and I'm sure it will go offline because of that ;-)

Daniel Beyer
_________________________________
YMC AG
Kreuzlingen, Switzerland
web: www.ymc.ch
____________________________________

Thorsten Studt

Monday 13 September 2004 8:27:28 am

Example from real life:

Some friends and I run a webserver at (german) 1&1. Everyone of us has his/her own webspace (customer in Confixx). We have one main ezp Installation in web0 that is set up as above.

In ..../design everybody has his/her directory corresponding to the username (web1, web2, ..., webX)

The homedir of each user (web1, web2, ..., webX) is linked to the directory under ..../design, so that each user can upload own templates and things.

Together with virtual host and the correct settings in the .ini-files, every user can make up a personal webspace based on the same installation.

In addition, if you create a 'site admin' role in ezp, you can restrict the admin interface and keep control of classes and things available to customers.

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

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