Package: phpbb2

Version: 2.0.21-6
Severity: minor


phpbb2 in Debian supports multiple boards using only one installed
instance of phpbb2.  The README.multiboard explains how to do this
using one installed database.

The attached patch adds to the README.multiboard and explains how to
have multiple boards using VirtualHost and different databases for
each board, including simultaneous use of two different DB's - i.e.
mysql and postgres.


-- System Information:
Debian Release: 4.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-686
Locale: LANG=en_US.utf-8, LC_CTYPE=en_US (charmap=ISO-8859-1)

-- 
Kevin Coyner  GnuPG key: 1024D/8CE11941
--- README.multiboard.orig	2007-03-04 09:15:45.000000000 -0500
+++ README.multiboard	2007-03-04 09:45:32.000000000 -0500
@@ -59,3 +59,75 @@
 		$table_prefix = 'ERR_NOT_EXIST_';
 	}
 
+---------------------------------------------------------------------------
+
+If you want to have multiple boards using virtual hosts, and have each board
+use a separate database, then instead of the above, do the following:
+
+1. Edit /etc/phpbb2/config.php as follows:
+
+<?php
+if ($_SERVER["HTTP_HOST"] == "forum.example.com")
+{
+   $dbms = 'mysql';
+
+   $dbhost = 'mysql.example.com';
+   $dbname = 'phpbb_sites';
+   $dbuser = 'mylogin';
+   $dbpasswd = 'mypassword';
+
+   $table_prefix = 'phpbb2_';
+
+}
+else if ($_SERVER["HTTP_HOST"] == "forum.example.net")
+{
+   $dbms = 'postgres';
+
+   $dbhost = 'postgres.example.net';
+   $dbname = 'phpbb_sites';
+   $dbuser = 'mylogin';
+   $dbpasswd = 'mypassword';
+
+   $table_prefix = 'phpbb2_';
+
+}
+else if ($_SERVER["HTTP_HOST"] == "forum.example.org")
+{
+   $dbms = 'mysql';
+
+   $dbhost = 'mysql.example.org';
+   $dbname = 'phpbb_sites';
+   $dbuser = 'mylogin';
+   $dbpasswd = 'mypassword';
+
+   $table_prefix = 'phpbb2_';
+
+}
+else {
+   $table_prefix = 'ERR_NOT_EXIST_';
+}
+
+define('PHPBB_INSTALLED', true);
+?>
+
+
+2. Uncomment the <VirtualHost *> section found in /etc/phpbb2/apache.conf and
+make an appropriate change to ServerName -- i.e. forum.example.com. Make sure the line:
+
+    php_value auto_prepend_file /etc/phpbb2/config.php
+
+points towards config.php, which you just edited above in #1.
+Each VirtualHost section should include this same line and all should point to
+the same config.php file.
+
+3. Add additional <VirtualHost *> sections in apache.conf as necessary for each of your
+intended phpbb2 boards.  Each VirtualHost section must have a different
+ServerName that obviously corresponds to each individual board -- i.e.
+forum.example.com, forum.example.net, forum.example.org, etc.
+
+4. Make sure you have proper DNS resolution on your DNS server for each of the different boards
+your set up in each of the VirtualHost sections.
+
+5. After making all changes, reload apache - /etc/init.d/apache force-reload.
+
+--

Reply via email to