Multiple sites in one database

Author Message

Maarten Holland

Thursday 17 August 2006 2:55:10 am

Hello all,

For an open-source project, I'm setting up 3 sites, all related to that project. Since a lot of content is shared amongst 2 or 3 sites, I really like to use one ezPublish with one database, to avoid having to publish content twice. This sounds logical to me, but perhaps I'm overseeing something fundamental, because based on all documentation and forum topics I've read, it looks like it is not possible to use 1 database for multiple sites?

I was thinking:
1 - Set up one ezPublish with 3 siteaccess for the frontends and 1 siteaccess for the backend. (All host-based).
2 - Create 3 folders (or 'sites' using a new content class) in the root of ezPublish.
3 - Publish content for each site in the right folder(s).

Here's the problem: I do not want to show the folder/site name from step 2 in the URL. Using Apache's rewrite rules, I've managed to remove 'index.php' from the URL. Unfortunately I don't have much knowledge of rewriting. Can anyone tell me if it's possible to use them to rewrite an URL like
http://www.domain1.com/index.php/domain1folder/article to http://www.domain1.com//article?

If I'm not mistaken, that should make it possible to run 3 sites in 1 database, shoudn't it?

Any hints, tips or links to more info is HIGHLY appreciated!

Thank you for your time,

Maarten

Paul Forsyth

Thursday 17 August 2006 3:16:29 am

Hi,

PathPrefix is what you want:

http://ez.no/doc/ez_publish/technical_manual/3_6/reference/configuration_files/site_ini/siteaccesssettings/pathprefix

So, setting PathPrefix to 'domain1folder' in one siteaccess will chop off that part of the url. And do the same for your other siteaccesses.

Paul

Maarten Holland

Thursday 17 August 2006 3:29:03 am

Yes! Thank you Paul! That's it! Did I mention ezPublish is <b>brilliant</b>?

Totally cool!

Any other hints and pitfalls are still very welcome though.

Thanks everyone,

Maarten

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

eZ debug

Timing: Jan 20 2025 06:37:46
Script start
Timing: Jan 20 2025 06:37:46
Module start 'layout'
Timing: Jan 20 2025 06:37:46
Module start 'content'
Timing: Jan 20 2025 06:37:46
Module end 'content'
Timing: Jan 20 2025 06:37:46
Script end

Main resources:

Total runtime0.0169 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 590.3906152.6406
Module start 'layout' 0.00630.0033 743.031339.4766
Module start 'content' 0.00970.0050 782.507889.2422
Module end 'content' 0.01470.0022 871.750034.3047
Script end 0.0169  906.0547 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002816.7390140.0002
Check MTime0.00127.2689140.0001
Mysql Total
Database connection0.00084.496910.0008
Mysqli_queries0.003319.719630.0011
Looping result0.00000.088810.0000
Template Total0.001810.910.0018
Template load0.00105.875110.0010
Template processing0.00085.012710.0008
Override
Cache load0.00074.243210.0007
General
dbfile0.00042.073080.0000
String conversion0.00000.049340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs