James Barrett | 3 Jun 18:52

Is this a sound method for a multiple database configuration?

Hello,

After taking a look at http://docs.phplist.com/MultipleDatabases I am
trying to create a better way to add multisite support to phplist.
This is approximately what I have envisioned:

1. unpack phplist to any sensible directory, such as /srv/phplist
2. configure apache to serve /lists as an alias for
/srv/phplist/public_html/lists
3. copy config.php to /etc/phplist/multisite/ with the filename
formatted as "example.com.config.php", "example.net.config.php", and
so on, for each domain
4. configure a database for each domain, and edit each domain's
configuration to use the correct database credentials
5. If different subdomains serve the same site, then create symlinks
for each subdomain:
   'ln -s example.com.config.php www.example.com.config.php'
6. replace the standard config.php with a special config.php which
automatically includes the correct server configuration if it exists,
or includes a default configuration if it exists, or else ends script
execution.

The code below will speak for itself.  This will allow for quick and
easy configuration of new domains, and also will allow for quick
de-configuration of phplist for one domain simply by moving the
domain's configuration file.

The apache configuration might look like this:
--------------

(Continue reading)

Michiel Dethmers | 3 Jun 19:26
Picon
Favicon

Re: Is this a sound method for a multiple database configuration?


I haven't read (or written) that docs page, but we generally use the
"SetEnv ConfigFile" in apache to load different configs per virtual host.

Michiel

James Barrett wrote:
> Hello,
>
> After taking a look at http://docs.phplist.com/MultipleDatabases I am
> trying to create a better way to add multisite support to phplist.
> This is approximately what I have envisioned:
>
> 1. unpack phplist to any sensible directory, such as /srv/phplist
> 2. configure apache to serve /lists as an alias for
> /srv/phplist/public_html/lists
> 3. copy config.php to /etc/phplist/multisite/ with the filename
> formatted as "example.com.config.php", "example.net.config.php", and
> so on, for each domain
> 4. configure a database for each domain, and edit each domain's
> configuration to use the correct database credentials
> 5. If different subdomains serve the same site, then create symlinks
> for each subdomain:
>    'ln -s example.com.config.php www.example.com.config.php'
> 6. replace the standard config.php with a special config.php which
> automatically includes the correct server configuration if it exists,
> or includes a default configuration if it exists, or else ends script
> execution.
>
> The code below will speak for itself.  This will allow for quick and
(Continue reading)


Gmane