All pastes #581277 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-06-21 13:18 UTC
rendered paste body
How to set several VirtualHosts with this package
------------------------------------------------------------------------------

  If you want to provide several virtual hosts of Bugzilla, you can achieve that
  goal easily thanks to your Apache configuration.

  You will need to enable the Apache mod_env module first:

    # apache-modconf apache enable mod_env

  Then, you have to prepare a configuration directory for your virtual
  host. The simpliest way is to copy the one the package created:
  `/etc/bugzilla'.
  Name this new configuration directory like that:
  `/etc/bugzilla/sites/host' where `host' is the name of your virtual host.

  You have now to add a virtual host section in your Apache configuraiton file.
  This can be achieved in different ways, depending on the kind of VirtualHost
  you want.

  This package comes with two virtual host examples, located under
  `/usr/share/doc/bugzilla/examples/'.

  If you want a vritualhost that uses the same static files as the orginal
  package, just use the example: `vh-basic.conf'.

  If you'd rather have different static files for the virtual host, you can
  use the other example: `vh-custom-static.conf'.

  As you can see in those examples, two environment variables are provided for
  fitting your needs:
    - X_BUGZILLA_SITE which is the name of the virtual host, it is used to find
      wich configuration directory to use: `/etc/bugzilla/sites/X_BUGZILLA_SITE'.
    - X_BUGZILLA_WEBPATH wich is the prefix to prepend to every static files in
      the templates.

  When you are ok with the apache configuration, you can restart it and
  test your virtual host.

  If you want to have specific templates for a given virtual host, that's also
  possible, just copy `/var/lib/bugzilla/template' to
  `/var/lib/bugzilla/template-X_BUGZILLA_SITE' and apply your changes there.
  Take care to preserve permissions when you copy the files.

  At this time, you can set a different database for each virtual host,
  customize templates for another or even share the same database... Everything
  is possible with few effort.

  Even though each bugzilla site will be updated with checksetup.pl, the params
  file won't be updated. The only params file that is updated during the
  postinst phase is the standard one: `/etc/bugzilla/params'.

  Thanks to Yann Dirson for the mod_env idea.