shared phpBB installation

I have several domains, some of them need a phpBB forum with modifications being added permanently. It's inconvenient to maintain several copies of the same files. Therefore, I've developed a method to store only one copies of files.

This method assumes that you are an administrator of your server. At least, you should have right to edit the configuration files and restart Apache.

Here are the steps.

1) Upload the phpBB installation script. Install phpBB as usual.

2) Remove the uploaded files.

3) In the Apache configuration for the domain, add:

Alias /forum/ "/home/uucode.com/public_html/forum/"

The first parameter to "Alias" is the URL path to your new forum, and the second parameter is the path to the phpBB files of the existing phpBB installation.

More details about the command: "Alias directive".

4) Restart Apache

5) Edit existing "config.php". Add something like:

<?php
// bbantispam.com etc
if (('bbantispam.com'     == $_SERVER['SERVER_NAME']) or
    ('www.bbantispam.com' == $_SERVER['SERVER_NAME']))
{
  $dbname = ':-)';
  $dbuser = ':-)';
  $dbpasswd = ':-)';
}
?>

6) Check that old and new forums work.

Enjoy!

21 September 2006, update

Similar solution and discussion on phpbb.com: "Hosting multiple forums".

Categories: PHP

Updated: