NAME

How to run Bricolage on a Virtual Host and on non-standard ports


VITALS

Version
$Revision: 1.4 $

Date
$Date: 2004/04/19 09:40:36 $

CVS ID
$Id: VirtualHosting.pod,v 1.4 2004/04/19 09:40:36 slanning Exp $


DESCRIPTION

This HOWTO describes how to run Bricolage on non-standard ports such as 81 and 444 (instead of 80 and 443), as well as how to run Bricolage as a virtual host on an existing Apache installation (not recommended).


REQUIREMENTS

The following constitutes a minimum installation

  Apache 1.3.22 or later
  mod_perl 1.27 or later
  apache_ssl 1.3.22+ssl_1.47 or later
    or
  mod_ssl 2.8.4-1.3.20 or later
  Bricolage 1.4.0 of later

The most recent versions of these applications and libraries are recommended. You must be familiar with the configuration of both SSL and Apache.


CAVEATS

This HOWTO describes two different methods to run Bricolage. One as a stand-alone process with or without virtual hosts for Bricolage admin and user purposes, and the other as a second instance of Apache running as a virtual host on an existing production Apache installation (not recommended).

So why the warning? Bricolage is a heavy process. Each Apache child starts life with a minimum 25 megabyte memory requirement and grows from there. More recent versions of Bricolage are even more resource-intensive. Granted, some of that memory is shared, but if Bricolage is run as a virtual host on a production installation, then each child process bears this overhead even though it may never be called upon to deliver Bricolage content.

If it is necessary to host Bricolage on a server with a production Apache installation, it is the author's opinion that running a second instance of Apache on alternate ports with a restricted number of children will provide more efficient use of the server memory resources.

If you still wish to run Bricolage on a virtual host, this HOWTO will tell you how to do that, too, but you've been warned.


SIMPLE VIRTUAL HOSTING CONFIGURATION

Setting up a Bricolage to run as a virtual host is as simple as editing your bricolage.conf file and restarting the server. By default, Bricolage automatically configures Apache so that it runs on a virtual host, even if that virtual host is the default host name. You can change the virtual host name for Bricolage by changing the VHOST_SERVER_NAME and NAME_VHOST directives. For example, if your server uses only one IP address, or you want your virtual host name to respond to requests on any IP address on your server, set the directives like so:

  NAME_VHOST        = *
  VHOST_SERVER_NAME = your.virtual.host.name.example.com

If you need to specify the IP address, do so in the NAME_VHOST directive:

  NAME_VHOST        = 192.168.1.1
  VHOST_SERVER_NAME = your.virtual.host.name.example.com

Then restart Bricolage. It will now respond to requests to your.virtual.host.name.example.com on 192.168.1.1. Be sure not to include a VirtualHost directive in your httpd.conf, as Bricolage will overwrite it and Apache will issue a warning.


MANUALLY CONFIGURING THE BRICOLAGE APACHE SERVER

Install Bricolage using the procedure described in the Bric::Admin. You may use any installation directories for Bricolage that you choose; however this HOWTO assumes that the defaults have been chosen (/usr/local/bricolage/...). Follow these additional instructions as you perform the installation:


USING ALTERNATE PORTS

This is the preferred method to run Bricolage in order to minimize resource utilization where a standard Apache web service must be provided as well as Bricolage admin and user services. The standard Apache service is not modified. Instead, a second master httpd process is run that provides Bricolage services on alternate ports. You may choose any ports you wish; in this HOWTO, ports 81 and 444 are used. SSL service on port 444 is not required, so ignore references to the setup of this service if it is not needed.

Install Bricolage using the procedure described in Bric::Admin. You may use any installation directories for Bricolage that you choose; however this HOWTO assumes that the defaults have been chosen (/usr/local/bricolage/...).

In most cases the default suggestions made by the configuration script will be the correct choice. There are several questions which must be answered as follows:

  Apache User:          [nobody]  your choice
  Apache Group:         [nobody]  your choice
  Apache Port:          [80]     81
  Are you sure you want to use '81'? [yes]
  Apache Server Name:   [your.server.name.example.com]

If you're using SSL, be sure to select an alternate port for SSL, too:

  Do you want to use SSL? [no] yes
  # use your path to bricolage certificate if applicable
  SSL certificate file location
      [/usr/local/apache/conf/ssl.crt/server.crt]
  SSL certificate key file location
      [/usr/local/apache/conf/ssl.key/server.key]
  Apache SSL Port:      [443] 444
  Are you sure you want to use '444'? [yes]
 Bricolage comes with two sets of defaults. You'll have the
 opportunity to override these defaults but choosing wisely
 here will probably save you the trouble. Your choices are:
   s - "single"   one installation for the entire system
   m - "multi"    an installation that lives next to other
                  installations on the same machine
  Your choice? [s] m

The rest of the installation can proceed in the normal fashion.


AUTHOR

Michael Robinton <michael@bizsystems.com>