Forums / Install & configuration / newbies -- how to create a second site on the same server

newbies -- how to create a second site on the same server

Author Message

LÊ Huu-Thao

Tuesday 28 September 2004 1:52:03 am

hi,

I did the tutorial for creating site.

Now, i'm trying to create a new site on the same server, is there a guide or something like that?

must i just copy/paste the right directory?

Thanks.

Thao

Lazaro Ferreira

Tuesday 28 September 2004 3:34:55 am

Read the concepts here:
http://ez.no/ez_publish/documentation/ez_publish_basics/site_management_in_ez_publish

Assuming your default or first site is named: "first_site"
Assuming your second site is named "second_site"
Assuming your SETUP is URL setup
Assuming your sencond site uses a different language and a different database account
Assuming your DB is MySQL DB

First create the database account (database, host, user, password )for your second site

A minimalistic step by step guide :

1) create a dir for settings of your second site as settings/siteaccess/second_site
2) copy files from settings/siteaccess/first_site to settings/siteaccess/second_site
4) create a dir for templates as design/second_site
6) create a dir for media storage and cache files as var/second_site
7) Edit the following settings in settings/siteaccess/second_site/site.ini.append

   
   [SiteSettings]
   SiteName=Second Site
   SiteURL=www.mydomain.com/second_site
   
   [DesignSettings]
   SiteDesign=second_site
   AdditionalSiteDesignList[]=first_site
   
   [FileSettings]
   VarDir=var/second_site
   
   [DatabaseSettings]
   Server=localhost
   Database=second_site_database
   User=my_user
   Password=my_password
   
   [ContentSettings]
   TranslationList=por-PT;eng-GB //here change to your list of languages
   
   [RegionalSettings]
   Locale=eng-GB   //here change to the second site language
   ContentObjectLocale=eng-GB  //change to the second site language


8) Add this lines to your settings/override/site.ini.append

[SiteSettings]
SiteList[]=second_site
[SiteAccessSettings]
AvailableSiteAccessList[]=second_site

Now you will need to create an extra site for admin your second site, assuming it uses a different database and a different language

9) create a dir for settings of your second site admin as settings/siteaccess/second_site_admin
10) copy files from settings/siteaccess/first_site_admin to settings/siteaccess/second_site_admin
11) Edit the following settings in settings/siteaccess/second_site/site.ini.append

   
   [SiteSettings]
   SiteName=Second Site Admin
   SiteURL=www.mydomain.com/second_site_admin
   
   [DesignSettings]
   SiteDesign=admin
   
   [FileSettings]
   VarDir=var/second_site
   
   [DatabaseSettings]
   Server=localhost
   Database=second_site_database
   User=my_user
   Password=my_password
   
   [ContentSettings]
   TranslationList=por-PT;eng-GB //here change to your list of languages
   
   [RegionalSettings]
   Locale=eng-GB   //here change to the second site language
   ContentObjectLocale=eng-GB  //change to the second site language


12) Add this lines to your settings/override/site.ini.append

[SiteSettings]
SiteList[]=second_site_admin
[SiteAccessSettings]
AvailableSiteAccessList[]=second_site_admin

13) Clear all the caches

Lazaro

Lazaro
http://www.mzbusiness.com

cristiano tomasi

Thursday 10 November 2005 8:02:03 am

Hi

I'm a newbie of ezPublish and I followed the procedure described by lazaro (thanks a lot lazaro).
I just would like to add some hint that are not eveident in the answer and maybe could help newbie like me (NOTE! I'm using ezPublis 3.7.0 on windows XP)

1) After you have created the second_site_database you must populate it running the 2 scripts

kernel_schema.sql
cleandata.sql

exactly in this order, you can find the scripts in the <ezpublishfolder>\ezpublish\kernel\sql

2) when you enter your new web site "second_site_admin" you should know that the defalut user is "admin" and the defalut passowrd is "publish"

bye
Cris.


Daniele Gubert

Saturday 10 December 2005 9:48:25 pm

Please note that cleandata.sql loads eng-GB content and this breaks it all if you've set up a different language.

You need to issue a couple of SQL updates in the DB to fix this, as described in the "Manual configuration of eZ publish" document.

SQL command #1:

UPDATE ezcontentobject_name
SET
 content_translation='nor-NO',
 real_translation='nor-NO'
WHERE
 content_translation='eng-GB' OR
 real_translation='eng-GB';

SQL command #2:

UPDATE ezcontentobject_attribute
SET
 language_code='nor-NO'
WHERE
 language_code='eng-GB';

Ciao, :DTM.