eZ publish manuals

install / multisite  

Multi site configuration

If you are settings up several sites with one eZ publish 3 installation using site access you might want to separate the cache and storage directory. This will make things less cluttered and easy to manage when having many sites per installation.

The default settings in eZ publish 3 stores cache and files in a common directory for all sites. This can cause problems if you e.g want to move one of the sites to another server in the future. This can be changed by setting some variables in your site.ini.append for each of your sites.

In this example we will seperate storage files and cache for 'myfirst.ezpsite.com', 'admin.myfirst.ezpsite.com', 'mysecond.ezpsite.com' and 'admin.mysecond.ezpsite.com'. After setting up site access (which you can read more about here) we need to set some additional settings in the site.ini.append files.

file: settings/siteaccess/myfirst/site.ini.append
[FileSettings]
StorageDir=myfirst/storage
CacheDir=myfirst/cache

file: settings/siteaccess/admin.myfirst/site.ini.append
[FileSettings]
StorageDir=myfirst/storage
CacheDir=myfirst/cache

file: settings/siteaccess/mysecond/site.ini.append
[FileSettings]
StorageDir=mysecond/storage
CacheDir=mysecond/cache

file: settings/siteaccess/admin.mysecond/site.ini.append
[FileSettings]
StorageDir=mysecond/storage
CacheDir=mysecond/cache

Now we told eZ publish to store myfirsts cache in var/myfirst/cache and myfirsts files in var/mysecond/storage. The same goes for the mysecond site.

Important: It is important that both the user and admin site has the same storage directory, or else if you e.g upload a new file using the admin site the user site will not be able to locate the file because it is looking for the file in the wrong directory.

eZ publish™ copyright © 1999-2003 eZ systems as