Hi,

I was thinking about the best way to install multiple instances of
OpenCA on one system. By this I mean e. g. two separate RAs or
CAs on the same hierarchy level.

I think currently the most sensible way to do this is:

- have different namespaces within the database for each instance
- have at least distinct cgi-bin/ etc/ and var/ directories for
  each instance with the correct configuration for each instance
- make the web server distinguish between the instances by using
  a 'URL prefix' before the node name, such as
  https://ra.example.com/instance1/ra   (...instance1/cgi-bin/ra)
  and have the Aliases pointing to the corresponding directory

Having distinct etc/ and var/ is sensible, but the location of the
configuration files is hardcoded into the cgi-bin/* stuff at
build time. So these CGIs would have to be copied and modified
in order to be able to access their corresponding instance configuration.

Is there any better way to do this? Should there even be support for
distinct instances by OpenCA?

I am thinking of at least the following mechanism:

- the CGI called by the web server determines the URI it was called
  with and tries to extract the instance name from the URI path.
- it uses the instance name to determine the configuration path

Idea for the CGIs (raw):

  my $URI = ...
  my ($instance) = ($URI =~ m#/(.*?)/cgi-bin/#);
  my $base = "/usr/local/openca-0.9.8/instances/$instance/";
  $AUTOCONF {"lib_prefix"}     = "$base/lib";
  $AUTOCONF {"etc_prefix"}     = "$base/etc";
  $AUTOCONF {"var_prefix"}     = "$base/var";

What do you think?


cheers

Martin



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
OpenCA-Devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/openca-devel

Reply via email to