Hosting multiple domains on single server

Author Message

mike bonning

Friday 05 May 2006 4:55:36 am

Hi,
I just installed 3.7.5 on a 2000 server and my initial site works great. I now need to add several more sites to the same server, but I am having trouble understanding the various articles posted about it. I understand that I need to edit the httpd.conf file and the site.ini.append.php file. can someone show me an example of these files that are actually hosting 3 or more sites? for example:
www.example1.com
www.eaxmple2.com
www.example3.com

Thanks, Mike

Hapee de Groot

Friday 05 May 2006 5:35:02 am

Have a look at:

http://httpd.apache.org/docs/2.0/vhosts/examples.html

and combine these examples with the virtual host setup of eZpublish and have a look at:

http://ez.no/community/forum/install_configuration/virtual_hosts_ez_publish or through the forum and you are done.

mike bonning

Friday 05 May 2006 8:57:10 am

Hi again,

All of the domains are now opening up but they all appear to be going to the same database. If I change something on one, then they all change. I think I'm still having trouble understanding how to setup in site access. Any suggestions?

Thanks, Mike.

Luke Barton

Monday 08 May 2006 7:57:54 pm

MIke,

You might want to walk through the setup of your top-level nodes and ini files.

For instance, this setup has 3 sites, each represented by a node. Underneath each node is the content for that domain:

ez_home
|--site_1_node
|----{all site_1 content is under here}
|--site_2_node
|----{all site_2 content is under here}
|--site_3_node
|----{all site_3 content is under here}

Then, in your /settings//override/site.ini.append.php file, map each domain to the respective node:

[SiteAccessSettings]
MatchOrder=host
HostMatchType=map
HostMatchMapItems[]=www.site1.com;site_1_node
HostMatchMapItems[]=www.site3.com;site_3_node
HostMatchMapItems[]=www.site3.com;site_3_node

If you do not want the top-level node of a site to show up in the URL, you can set the path prefix for each site. Here's one sample in /settings/siteaccess/site_1/site.ini.append.php:

[SiteAccessSettings]
PathPrefix=site_1_node

Also, check your permissions in the /settings/ folder. I forget which -- maybe "chmod 0755 -R /settings or chmod 0777 -R /settings/".

Then clear all your caches from the command line: bin/shell/clearcache.sh --clear-all

Hope this helps.

-Luke

Theodoros Papageorgiou

Friday 12 May 2006 12:43:50 pm

Hi,

You'd better create additional include conf files for each site instead of editing the httpd.conf itself.
Also it may be better to use a separate database, and var directory for each site.

Best,

Theo

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

André R.

Friday 12 May 2006 2:34:08 pm

Just one thing, you write 2000 server.
You shouldn't use windows if you care for performance, ez publish is highly optimized for php most common home: Linux and apache.

Then over to the database, I understand u have several domains that needs their own content?

You could either let them use the same db but different paths of the content like Luke suggested.

Or you can duplicate the database you have now (either copy or dump/import).
And specify each siteaccess/site.ini.... witch db (dbname) each siteaccess should use and they should also use their own cache folder (site1):

[DatabaseSettings]
DatabaseImplementation=ezmysql
Server=localhost
User=dbuser
Password=dbpwd
Database=dbname

[FileSettings]
VarDir=var/site1

In the last case you'll have to create admin siteaccess for each domain as well!

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

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