[phpBB] svn: r365 - in trunk: phpbb2 phpbb3

kink at wolffelaar.nl kink at wolffelaar.nl
Wed Apr 4 13:46:58 CEST 2007


Author: kink
Date: 2007-04-04 13:46:57 +0200 (Wed, 04 Apr 2007)
New Revision: 365

Modified:
   trunk/phpbb2/README.multiboard
   trunk/phpbb2/changelog
   trunk/phpbb3/README.multiboard
Log:
* Expand README.multiboard with detailed info on using separate databases
  for each board. Thanks Kevin Coyner (Closes: #413366).


Modified: trunk/phpbb2/README.multiboard
===================================================================
--- trunk/phpbb2/README.multiboard	2007-04-03 19:28:29 UTC (rev 364)
+++ trunk/phpbb2/README.multiboard	2007-04-04 11:46:57 UTC (rev 365)
@@ -59,3 +59,74 @@
 		$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 of your set up in each of the VirtualHost sections.
+
+5. After making all changes, reload apache - /etc/init.d/apache force-reload.
+

Modified: trunk/phpbb2/changelog
===================================================================
--- trunk/phpbb2/changelog	2007-04-03 19:28:29 UTC (rev 364)
+++ trunk/phpbb2/changelog	2007-04-04 11:46:57 UTC (rev 365)
@@ -1,8 +1,10 @@
 phpbb2 (2.0.21-7) unstable; urgency=low
 
   * Added Portuguese debconf translation by Ricardo Silva (Closes: #414599).
+  * Expand README.multiboard with detailed info on using separate databases
+    for each board. Thanks Kevin Coyner (Closes: #413366).
 
- -- Thijs Kinkhorst <thijs at debian.org>  Tue, 03 Apr 2007 21:27:47 +0200
+ -- Thijs Kinkhorst <thijs at debian.org>  Wed, 04 Apr 2007 13:45:47 +0200
 
 phpbb2 (2.0.21-6) unstable; urgency=high
 

Modified: trunk/phpbb3/README.multiboard
===================================================================
--- trunk/phpbb3/README.multiboard	2007-04-03 19:28:29 UTC (rev 364)
+++ trunk/phpbb3/README.multiboard	2007-04-04 11:46:57 UTC (rev 365)
@@ -59,3 +59,74 @@
 		$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 of your set up in each of the VirtualHost sections.
+
+5. After making all changes, reload apache - /etc/init.d/apache force-reload.
+





More information about the phpBB-l mailing list